Customize each search panes to use multi or single
Customize each search panes to use multi or single
naze
Posts: 18Questions: 4Answers: 0
I want the user to be able to select multiple options in the first search pane, but only one options at a time in the second search pane.
This is a link to a test case:
https://vn4goh.sse.codesandbox.io/
This question has accepted answers - jump to:
Answers
https://codesandbox.io/s/create-and-use-environment-variable-in-nextjs-forked-vn4goh?file=/components/table/myTable.js:928-956
Yep, that's possible. The SearchPanes just use DataTables for each pane, so you can use the
select.style
to control the behaviour for each pane individually, something like this:Colin
I see I can target the columns directly, what if the target is a custom search pane like the example in the sandbox?
Still the same technique although you use the
searchPanes.panes.dtOpts
object in your custom pane.Allan
Hi Allan,
This is answering my question, but I am not sure why it is not working in practice. When I give different select configuration, the table grabs the select: single configuration and not the multi. You can look at the example posted. I defined the columns in columns.js that is being used in the panes. and the other options are in options variable.
Is there a way I can view and edit the source code in that example? I get the page (although oddly it doesn't render at all in Firefox), but the code is all compressed and not easy to read.
Thanks,
Allan
You should be able to. Maybe another browser might work, either safari or chrome.
The columns are defined in the columns.js file
then the configurations are used inside the table component:
Are you able to see the source code in this link: https://codesandbox.io/s/create-and-use-environment-variable-in-nextjs-forked-vn4goh?file=/components/table/myTable.js:928-956
I've got it this time - thanks. I've committed a fix for this error and it will be in the nightly soon. If you could let me know how you get on with it, that would be really useful.
Allan
When will it be released? and when will be added to the actual library?
Its in the library now and you can use it via the nightly builds. I'll be issuing a release probably the week of the 11th June. It might happen next week if I get a bit of a gap to do it. It is currently the only change from 2.0.2.
Allan