Im using buttoned pageLength but how can I make them like a radiobtn?
Im using buttoned pageLength but how can I make them like a radiobtn?
Pepayu
Posts: 4Questions: 2Answers: 0
Basically what I want is
10 25 50
Side by side to each other. not
10
10
25
50
like this
Answers
Hello again guys im so sorry for spamming the forum board, I'm just desperate. I manage to do this by :
Basically my main concern is im using stateSave and I want to preserve what the page length the user will click. So when I tried doing this via button type it works and the last length the user clicked is still there.
It's unclear from your last post if you are still having issues or not. I believe the page length should be saved when using the
page.len()
API. If you are having issues please provide a test case replicating the issues you are having so we can help debug.https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin
A while back I wrote a plugin called LengthLinks which might be of some interest. Demo here.
It doesn't use the Buttons library like your solution though.
The page length will be maintained, but you'll need to use
buttons.buttons.init
to set the initial state of the button (actually, you don't currently usebutton().active()
to indicate if a button is active or not - you might want to consider doing that). You could add adraw
listener in the button's init, and check if that button should be active or not.Sounds like a good blog post option - I've added it to my list.
Allan