/
githubmirror
/
tabler
Обзор
Документация
Войти
/
githubmirror
/
tabler
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
dev
shared/components/js/TablerList.astro
29 строк
845 B
Paweł Kuna
Clear remaining astro check hints in shared, docs, and screenshots (#2837)
08 авг 2026, 18:17
Не верифицирован
08 авг 2026, 18:17
2777fff
Код
Авторство
О чём код?
--- import CaptureScript from '../CaptureScript.astro' interface Props { id?: string /** List.js `valueNames` entries — plain strings or `{ attr, name }` sort descriptors. */ valueNames: (string | { attr: string; name: string })[] } const { id = 'default', valueNames } = Astro.props const listId = `table-${id}` --- <CaptureScript> <!-- BEGIN TABLER LIST --> <script is:inline define:vars={{ listId, valueNames }}> function initTablerList() { window.tabler_list ??= {} window.tabler_list[listId] = new List(listId, { sortClass: 'table-sort', listClass: 'table-tbody', valueNames, }) } document.readyState !== 'loading' ? initTablerList() : document.addEventListener('DOMContentLoaded', initTablerList, { once: true }) </script> <!-- END TABLER LIST --> </CaptureScript>