Replies: 1 comment 2 replies
-
This was an interesting question. from nicegui import ui
columns = [
{'name': 'name', 'label': 'Name', 'field': 'name', 'required': True, 'align': 'left'},
{'name': 'age', 'label': 'Age', 'field': 'age', 'sortable': True},
]
rows = [
{'name': 'Elsa', 'age': 18},
{'name': 'Oaken', 'age': 46},
{'name': 'Hans', 'age': 20},
{'name': 'Sven'},
{'name': 'Olaf', 'age': 4},
{'name': 'Anna', 'age': 17},
]
table = ui.table(columns=columns, rows=rows, pagination=1)
table._props["rows-per-page-options"] = ["2", "4", "6"]
ui.run() That allows you to set the options you want - in my case it was 2, 4 6. It's wierd that it requires strings though - I'll give it that much. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Question
Hello,
https://quasar.dev/vue-components/table/
table has a prop: rows-per-page-options
I tried a lot of options:
Nothing seems to work. How can I set it with nicegui?
Thanks, Adam
Beta Was this translation helpful? Give feedback.
All reactions