app/pb_kits/playbook/pb_table/docs/_table_header
The table_header
subcomponent creates “ elements and optionally accepts:
colspan
(number) for setting column spansort_menu
accepts sort options as an array ofitem
objects. presence ofsort_menu
enables the sort link within the headersort_dropdown
(boolean) optionally declares that (true) clicking a header’s sort link opens a dropdown of sort options, or (false) each sort link click cycles through available sort_menu items in the order they are passed- passing a valid
colspan
will render sort options within a dropdown by default, without requiringsort_dropdown
explicitly. Alternatively, the default sort dropdown can be prevented on headers withcolspan
by settingsort_dropdown: false
, which reverts the column to sorting to multi-click default (each click of the sort link cycles through the available sort_menu items in the order they are passed)
- passing a valid
id
(string) is required for headers that have a dropdown (for popover reference); otherwise they are optional
Disclaimer
This example uses a custom sort method that may need to be modified or replaced within your project.