Skip to content

How to enable/disable binding? #5914

Answered by ddkasa
yikaifeng asked this question in Q&A
Jul 1, 2025 · 1 comments · 8 replies
Discussion options

You must be logged in to vote

You can implement a check_action method. Just return False or None depending on the action, and it will disable the Binding.

https://textual.textualize.io/guide/actions/#dynamic-actions
https://textual.textualize.io/api/dom_node/#textual.dom.DOMNode.check_action

Replies: 1 comment 8 replies

Comment options

You must be logged in to vote
8 replies
@ddkasa
Comment options

@yikaifeng
Comment options

@edward-jazzhands
Comment options

@yikaifeng
Comment options

@willmcgugan
Comment options

Answer selected by willmcgugan
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