Bug with Buttons colVis
Bug with Buttons colVis
Hello,
i have bug with multi filter - type select in header.
column visibility with show lable title and all options in select
exemple my column
<th class="sorting_disabled" rowspan="1" colspan="1" aria-label=" Agence - any -ParisLyon">
<label for="search-field-agence-chantier">Agence</label>
<select id="field-agence-chantier" name="field_agence_chantier" class="form-control search form-select">
<option value="">- any -</option><option value="Paris">Paris</option><option value="Lyon">Lyon</option></select> </th>
it will show Agence - any -ParisLyon. how can i got only label Agence?
This question has accepted answers - jump to:
Answers
i think file buttons.colVis.js
line 151
should add
var title = dt.settings()[0].aoColumns[ idx ].sTitle
.replace(/<select(.*)<\/select>/g, "")
Yup - its a little hacky, but that's a good wrong around for now until I sort out a better API for this sort of thing.
Fix committed here and it will be in the next release.
Regards,
Allan
Hello,
I have one question. How can change colVis like checkboxes? checkboxes makes user able understand column visibility more quickly than an button color.
for bootstrap theme how can i change it to list group ?https://getbootstrap.com/docs/3.3/components/#list-group
You might be able to adapt this example to use checkboxes:
https://datatables.net/examples/api/show_hide.html
Kevin
yes it is another way but colVis is best way. can i make custom button ?
it look like buttons: [
'copy', 'colVisCheckboxes', 'pdf'
]
and i create file buttons.colVisCheckboxes.js in same folder?
At the moment, the best option is probably to use a UTF8 checkbox character and put that in to the CSS for your page.
http://live.datatables.net/xuxejava/1/edit
Allan
oh thanks dont think about it with ccss and symbol