Skip to content

How I can add additional column (with button) in ui.table (qtable) for existing table #668

Closed Answered by dclause
bobanovo asked this question in Q&A
Discussion options

You must be logged in to vote

hi !

It is tricky to do with Quasar table already, so using it with niceGUI is even more! You can see an example at:
https://github.com/zauberzeug/nicegui/blob/main/examples/table_and_slots/main.py

Regarding your particular need, What you need is called "body slot' in Quasar element :
https://quasar.dev/vue-components/table#body-slots

Here is a minimal example :

with ui.table(columns=[
    {'name': 'name', 'label': 'Name', 'field': 'name', 'sortable': True, 'align': 'left'},
    {'name': 'age', 'label': 'Age', 'field': 'age', 'sortable': True, 'align': 'left'},
    {'name': 'actions', 'label': 'Actions', 'field': 'actions', 'align': 'left'},
], rows=[
    {'id': 1, 'name': 'Damien', 'age': 

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@bobanovo
Comment options

@bobwatcherx
Comment options

@falkoschindler
Comment options

Answer selected by falkoschindler
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants