Using Tabulator 6.3 and header filters, did someone manage to build a list of grouped values ? I'm already feeding the values with a custom list built from an ajax call, but how to tell Tabulator to group these values ?
Here is my list
[
{ value: "V1", group: "A group" }
,{ value: "V2", group: "A group" }
,{ value: "V3", group: "A group" }
,{ value: "V4", group: "A group" }
,{ value: "V12", machinelist: "Another group" }
,{ value: "V13", machinelist: "Another group" }
,{ value: "V14", machinelist: "Another group" }
,{ value: "V15", machinelist: "Another group" }
]
I tried the groupBy option, no chance.
I get this with a standard array of values:
<select multiple>
<option value="V1">V1</option>
<option value="V2">V2</option>
<option value="V3">V3</option>
<option value="V4">V4</option>
<option value="V12">V12</option>
<option value="V13">V13</option>
<option value="V14">V14</option>
<option value="V15">V15</option>
</select>
What I get And would like to get something like this:
<select multiple>
<optgroup label="A group">
<option value="V1">V1</option>
<option value="V2">V2</option>
<option value="V3">V3</option>
<option value="V4">V4</option>
</optgroup>
<optgroup label="Another group">
<option value="V12">V12</option>
<option value="V13">V13</option>
<option value="V14">V14</option>
<option value="V15">V15</option>
</optgroup>
</select>
What I'd like I feel I need to use the custom formatting option but do not see how for the header filter. Any idea ?
Edit, self answer: RTFM ! .3/edit#editor-list I got there by looking at the source code for "listItemFormatter" that pointed me from this deprecated option to the editor.