SearchPane - Pre-populate with options
SearchPane - Pre-populate with options
Hi,
Is it possible to pre-populate with options even though there is no valid data yet?
An example would be: https://datatables.net/extensions/searchpanes/examples/initialisation/simple.html
Inserting an 'Office' for Paris even though there is no corresponding row with that data.
Reason... Using this for a daily log, wanting it so departments can open at the start of the day and select their department even though no data exists yet. The page auto refreshes from the ajax feed and the logs appear for their department.
This question has an accepted answers - jump to answer
Answers
Sort of! You can define custom options using
columns.searchPanes.options
(example here) which would allow what you are looking for. But it needs a matching function to be specified as well - that would perhaps be as simple as a direct comparison in this case.I'll look at how we could make the function optional, so you'd just need an array of labels.
Allan
Gotcha! I use that elsewhere, didn't think of it for this case. That'll work perfectly.
Thanks!