How to set custom widths of columns in ui.table, and how to wrap text for longer strings in ui.table cells? #2914
Answered
by
falkoschindler
msiwik-epruf
asked this question in
Q&A
-
Beta Was this translation helpful? Give feedback.
Answered by
falkoschindler
Apr 18, 2024
Replies: 1 comment
-
Hi @msiwik-epruf, You can add custom CSS to the column definition to define the text wrap behavior: ui.table(
columns=[
{'name': 'name', 'label': 'Name', 'field': 'name', 'align': 'left', 'style': 'text-wrap: wrap'},
{'name': 'age', 'label': 'Age', 'field': 'age'},
],
rows=[
{'name': 'Alice', 'age': 18},
{'name': 'Bob', 'age': 21},
{'name': 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam nec purus nec nunc ultricies'},
],
).classes('w-80') |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
msiwik-epruf
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @msiwik-epruf,
You can add custom CSS to the column definition to define the text wrap behavior: