Skip to content

Disable mouse on DataTable? #5200

Answered by TomJGooding
fohrloop asked this question in Q&A
Discussion options

You must be logged in to vote

You can use the prevent_default method as mentioned here: https://textual.textualize.io/guide/events/#preventing-default-behaviors

    async def _on_click(self, event: events.Click) -> None:
        event.prevent_default()

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@fohrloop
Comment options

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