How to access each element of a hovered row in a ui.table? #993
Ruibin-Liu
started this conversation in
Ideas / Feature Requests
Replies: 1 comment
-
Thanks for the suggestion, @Ruibin-Liu! columns = [{'name': 'name', 'label': 'Name', 'field': 'name'}]
rows = [{'name': 'Alice'}, {'name': 'Bob'}, {'name': 'Carol'}]
table = ui.table(columns=columns, rows=rows, row_key='name')
table.add_slot('body-cell', r'''
<q-td :props="props" @mouseover="$parent.$emit('mouse_over', props)">
{{ props.value }}
</q-td>
''')
table.on('mouse_over', lambda msg: ui.notify(msg['args']['row'])) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I know this discussion has a solution to get a single row when clicking on it by changing the
selected
prop. But I want to access some elements of the row the user mouse is hovering upon. Ideally, it should invoke a callback function when such elements are hovered on.Beta Was this translation helpful? Give feedback.
All reactions