What to use instead of deferLoading at the present moment?
What to use instead of deferLoading at the present moment?
Hello.
I have a scenario where the deferLoading
feature makes sense, but it is now deprecated and its use discouraged, as per the documentation on https://datatables.net/reference/option/deferLoading
This is the scenario. I have a datatable, where the header of a column is a filtering dropdown, with several options, and additional the '...' which means no filter.
The feature specified that the initial state when the user lands the page will be not the '...' option, but the '2- To Do' state.
So the implementation is done using the datatable normal behavior of dataTable, and at the end of document.ready()
we use an hammer like:
$("#statusDropDownChosen").val("@((int) StatusEnum.ToDo)").trigger("chosen:updated").trigger('change');
This approach does not seem good to my eyes, as there is an initial avoidable call triggered automagically by the datatable initialization, with the '...' no filter.
How can I specify I don't want the initial automatic backend invocation?
And it would be nice if I could get rid of the trigger stuff, as it smells like hammering to me, when I suspect there may be more straightforward ways of doing the same?
Answers
Are you able to give me a link to your page please? I'm struggling a little to picture it. Are you using server-side processing for the table?
Allan
Hello. Thanks for your interest. I can not because this is private intellectual property of a company. If this would be an open-source project, I would publish it here, for sure. Perhaps, could a private direct message to you be an option?
Sure thing - click my forum user name at the top of this message and then click the "Send message" button to send me a private message.
Allan