How would I update the column title in a colvis button?
How would I update the column title in a colvis button?

Link to test case: https://live.datatables.net/mubocoqi/1/edit
Description of problem:
I have a select where I can change the units displayed in a title when it changes. It updates the table header ok, but doesn't update the corresponding text in the colvis button collection. How would I get it to update?
This question has an accepted answers - jump to answer
Answers
It isn't intuitive (there isn't a trivial API call to make it reread the titles), but what you could do is rebuild the downdown with
button().collectionRebuild()
.That would look something like this: https://live.datatables.net/mubocoqi/2/edit .
Allan
That seems to work well! Thank you for your help!