Implementing Pre-Select for searchPanes Button
Implementing Pre-Select for searchPanes Button
Link to test case: https://live.datatables.net/rumujone/2/edit
Description of problem: I am looking into utilizing the pre-select option with searchPanes. I believe I am currently unable to do this because of the way I append the buttons to the table as a collection of custom buttons instead of the traditional way creating the buttons in the table initialization.
I am currently doing this so I have more control on the buttons' appearance and actions, but I believe it is preventing me from using the pre-select. Does anyone know where to implement it? I have tried within the table initialization and the button initialization, but I'm not sure beyond there.
Any insight into this would be greatly appreciated. Thank you!
This question has accepted answers - jump to:
Answers
You are right, and I think I need to change that. At the moment SearchPanes in a button doesn't initialise until the button is actually clicked (the idea was that we could spread the initialisation processing time around, to make it feel more performant for the end user). It means that pre-selection doesn't filter the table though.
I'm not sure there is a way to do that other than to change SearchPanes' button definition. I'll look into adding that as an option.
Allan
@allan Thank you for the comment! That's kind of what I was expecting, but I wanted to make sure I was not missing something.
I've committed a change that adds a
delayInit
option to the SearchPanes button allowing the delay to be disabled.Allan
@allan Thank you so much! I'll take a look!
@allan Do you know how to run the SearchPanes build script? Do I just clone the repo and run
./make.sh extension SearchPanes
or is there something I need to do beforehand?No it's not involved then that. You need the DataTablesSrc repo as well, then SearchPanes goes in an
extensions
directory.Easiest option is just to use the nightly.
Allan
@allan Ah perfect! Thank you for the link!
The button now appears to be breaking at the
fastData()
function in the searchPanes JavaScript. Do you know why that might be?https://live.datatables.net/dijihepi/1/edit
Doh - sorry. The SearchPanes nightly depends upon DataTables 2... That is also in the nightly, but perhaps the easiest option now is actually to take the current SearchPanes release and modify it with the change from my commit above.
Or hang on a little while for me to release DataTables 2 and friends Maybe by the end of the week - all being well. That's the plan...
Allan
@allan No worries!! I have some other things to work on so I can wait! Thanks for the update!
@allan The updates are awesome! Loving the
layout
option instead ofdom
.I am having trouble with the
delayInit
. ThepreSelect
seems to only work after the searchPanes' button is pressed. Is there anyway to make it work upon page load?https://live.datatables.net/jurayaqa/1/edit