List Block Enhancement

Hey @aj_martin,

Please try this code. @matthieu_chateau just edited the code.

<style>
    .hide-records .filters-middle-section {
        display: none !important;
    }
</style>
<script>
    window.addEventListener('get-records-list1:before', (e) => {
        const listClasses = document.getElementById('list1').classList;
        if (e.detail.search || e.detail.filter.length) {
            listClasses.remove('hide-records');
        } else {
            listClasses.add('hide-records');
        }
    });
</script>

Please, replace List1 with block names.

4 Likes