When creating button in StateRestore SecondarySplit is it possible to know which state button is for
When creating button in StateRestore SecondarySplit is it possible to know which state button is for
This is my third (and hopefully last) issue
Test Case: http://live.datatables.net/piqeheyu/1/edit?js,output
See comment in test case, trying to get access to the Saved State ID when creating the Secondary Split button.
I have a use case where I would like to change the label based on a certain state of the specific "Saved State".
I have the code to check for the condition but I don't have access to the correct StateId to make it work.
This question has an accepted answers - jump to answer
Answers
We'll take a nose to this and the other two when Sandy returns in the new year!
Colin
@colin OK no worries. Happy New Year! Sandy tried to help with this issue in another "answered" thread but the case I presented was confusing and I think distracted from what I wanted to do. I didn't understand how to apply the answer so I decided to break out the questions and make each test case more simple. Cheers!
Hi @desperado ,
The
buttons.buttons.text
function is one of the first to be run, so the_stateRestore
property is not going to be available at that point. Instead you will have to use the init function and do something along the lines of the following example.Thanks,
Sandy
@sandy Very cool! That's exactly what I needed!