Widget: DCTList: Difference between revisions
From LINKS Community Center
Eschmidt (talk | contribs) No edit summary |
Eschmidt (talk | contribs) No edit summary |
||
Line 646: | Line 646: | ||
tabulator.off('renderComplete', markImages); | tabulator.off('renderComplete', markImages); | ||
} | } | ||
tabulator.on('renderComplete', markImages); | tabulator.on('renderComplete', markImages); // TODO: Prevent this from running if corresponding filters are not active. | ||
}); | }); | ||
// Listen for changes in filter checkbox state. | // Listen for changes in filter checkbox state. | ||
Line 676: | Line 667: | ||
const wrapper = el.closest('.filter-wrapper'); | const wrapper = el.closest('.filter-wrapper'); | ||
el.addEventListener('click', event => void wrapper.classList.toggle('open')); | el.addEventListener('click', event => void wrapper.classList.toggle('open')); | ||
}); | |||
// Fix bug where the table is truncated to zero height despite having visible rows | |||
tabulator.on('renderComplete', function() { | |||
console.log('render complete') | |||
try { | |||
const holderHeight = tabulator.rowManager.element.offsetHeight; | |||
const tableHeight = tabulator.rowManager.tableElement.offsetHeight; | |||
if (holderHeight < tableHeight) { tabulator.redraw(); } | |||
} catch (ignore) { } | |||
// tabulator.rowManager.displayRowsCount | |||
}); | }); | ||
}); | }); |
Revision as of 14:21, 2 November 2022
Development verstion of the DCT List.
Not ready for production!