pageLength menu as buttons instead of dropdown

pageLength menu as buttons instead of dropdown

chubby92chubby92 Posts: 4Questions: 1Answers: 0

How can I do the above (what's in the title)?
I tried to find a solution for hours now

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,831Questions: 1Answers: 10,518 Site admin

    Like this?

    Allan

  • chubby92chubby92 Posts: 4Questions: 1Answers: 0

    @allan no, this is drop down.. I want buttons side by side

  • allanallan Posts: 63,831Questions: 1Answers: 10,518 Site admin

    In which case you could use custom buttons that simply call the page.len() method from their action function.

    Allan

  • chubby92chubby92 Posts: 4Questions: 1Answers: 0

    @allan Thanks but I have few problems with that.
    1. The documentation is not updated, I dont have such function
    2. What if I want to make the buttons as group button?
    3. What if I want to make the active button with different class (if I have a button that shows 20 rows, it should be active untill it was changed)

    (I have done it by using dom element but I dont like this way :X)

  • allanallan Posts: 63,831Questions: 1Answers: 10,518 Site admin
    Answer ✓
    1. The documentation is not updated, I dont have such function

    What documentation? The custom buttons or page.len()? That's been in since 1.10.0.

    1. What if I want to make the buttons as group button?

    A group as in a drop down? Use the collection button type.

    1. What if I want to make the active button with different class

    This is where Buttons defines the classes it uses and you can change that as you need.

    Allan

  • chubby92chubby92 Posts: 4Questions: 1Answers: 0

    @allan Thank you very much, I needed the first and the second answers, they helped me to achieve my goal

This discussion has been closed.