Widget: DCTList: Difference between revisions

From LINKS Community Center
Jump to: navigation, search
Eschmidt (talk | contribs)
No edit summary
Eschmidt (talk | contribs)
No edit summary
Line 140: Line 140:
         table.on('tableBuilt', () => {  
         table.on('tableBuilt', () => {  
             table.setData(dcts);  
             table.setData(dcts);  
            // table.setFilter(dctFilter, { foo:3 });
            // console.log('Filter 1', table.getFilters())
            // table.setFilter(dctFilter, { foo:666 });
            // console.log('Filter 2', table.getFilters())
         });
         });


         document.getElementById('data-source-filter').addEventListener('change', event => {
         document.getElementById('data-source-filter').addEventListener('change', event => {
            console.log(event)
             const selectedSources = Array.from(document.querySelectorAll('#data-source-filter input[type="checkbox"]:checked')).map(el => el.value);
             const chk = Array.from(document.querySelectorAll('#data-source-filter input[type="checkbox"]:checked')).map(el => el.value);
            table.setFilter(dctFilter, { dataSources: selectedSources });
             console.log(chk)
             console.log('Filter 1', table.getFilters())
         }, { passive: true });
         }, { passive: true });



Revision as of 13:44, 8 June 2022

Development verstion of the DCT List.
Not ready for production!