lengthMenu is hidden when dom/buttons are enabled, need help

lengthMenu is hidden when dom/buttons are enabled, need help

VarshneyVarshney Posts: 9Questions: 1Answers: 0

I'm not sure what's happening here but when I'm wanting to create records I can do it without a hitch, however there are instances where I want to display more than 10 records at a time, so I enabled this option:

lengthMenu: [[1, 10, 25, -1 ], [1, 10, 25, "All"]]

This at first seemed like it didn't work however I do know that it does work because the table defaulted to a single row only. If I changed the first value then it would always affect the table. So the option is working so I decided to comment out these options:

dom: "Bfrtip",
buttons: [
    { extend: "create", editor: editor },
    { extend: "edit", editor: editor },
    { extend: "remove", editor: editor }
]

This then suddenly showed the lengthMenu select box, but re-enabling them hide the select box. Is there a way to get them both to show up side-by-side?

Replies

  • tangerinetangerine Posts: 3,350Questions: 37Answers: 394

    Your "dom" initialisation needs a small letter "l" (pronounced "ell" for clarity)
    for the length menu.

  • VarshneyVarshney Posts: 9Questions: 1Answers: 0

    Aha, thanks. I had a feeling it would've been something ridiculously simple like that.

This discussion has been closed.