columnControl Query
columnControl Query

Link to test case: https://ordco.au/dt_test.html
Debugger code (debug.datatables.net): 403
Error messages shown: No Error
Description of problem:
Hi
I implemented the new columnControl extension on one of our sites this morning, and I thought I had it working but have an issue where the searchList is only populating the options on the initial screen (from the 10 rows) on page load.
Have stripped down a production site to the above example which shows the issue on the "Purpose" Column - only showing 5 options (there are 12 in the dataset) - if you look at another page there are things like "Grower Visits", "Reporting" in the column but not shown in the searchList.
The data is coming from datatables editor, have stripped all that stuff out for the example.
I did look at the editor documentation and it has a page called "Column control" "https://editor.datatables.net/examples/datatables/columns.html" but I think that is for columns in an Datatable as an input - or I could be very wrong and the answer is staring me in the face !
The blog post says future Server Side processing is coming and I am not sure if editor falls under this - I don't have that flag enabled
I have set the following as editor uses ajax : columnControl: ['order', [{ extend: 'searchList', ajaxOnly: false }]],
I am getting a 403 (Reason: CORS header ‘Access-Control-Allow-Origin’ missing) error when uploading the debug data
Any idea what I am doing wrong?
Thanks in advance for any help
Pete
This question has an accepted answers - jump to answer
Answers
The honeymoon didn't last long! I'm not entirely certain what is going wrong there, but certainly it does look like there is an error. Let me dig into it and I'll get back to you later today.
Allan
Got it. It was due to an incorrect selector to get the column's data (it needed the
tr
elements to exist, which isn't the case for any rows other than the first page due todeferRender
being enabled by default).I've committed a fix and will tag a release for it tomorrow (will see if there are any other reports from the 1.0.0 release over night
).
Allan
Hi Allan
That works perfectly now, thank you so much.
I realise I should of started with what an amazing extension this is, is going to be very useful.
Thanks again for the awesome datatables and outstanding support.
pete
Hi Pete,
I've just tagged and released ColumnControl 1.0.1 with this change. It's in the download builder now.
Delighted to hear that you are finding the new extension to be useful - much appreciated
Allan
Hi Allan
Sorry to bother you again, I just put this into production and the performance is rough.
WIthout columnControl the production page initialised in less than 2 seconds. If I enable 1 column (entry_type) it then takes 7 seconds to initialise. If I enable both entrytype and pupose it seems to crash the browser.
I wanted to put in 5-6 columns in here but reduced it down to see how many it can handle.
My demo originally had a cut down 50 rows - production has 5,500 - demo now has 5,500 rows
I have updated this page with one selected (few seconds):
https://ordco.au/dt_test.html
and this one has two selected (does not work):
https://ordco.au/dt_test_2.html
and this one with none (no cc - nearly instant on this demo):
https://ordco.au/dt_test_no_cc.html
do you need any more info?
Thanks
pete
Hi Pete,
Thanks for the test cases! Could you try the nightly build please? I've put in a change for the
searchList
which will speed things up.Allan
You nailed it...
working on 5 columns in prod no issues
thanks so much
i updated the demos, they are pretty much instant now
very impressed as always
Awesome - glad to hear that has done the business. The DataTables API is very flexible, but its context switching comes at a cost which is very apparent when used in a tight loop. That is something I aim to address in v3 (whenever that might happen!).
I've tagged up and release ColumnControl 1.0.2 with this fix.
Thanks again for the feedback and helping to make it better!
Allan