-
Is it possible to enable/disable an existed binding? How to do that?
I'd like to disable/enable Delete depending on some event. I got that binding by self.active_bindings.get('d'), but can't find method or property for disable |
Beta Was this translation helpful? Give feedback.
Answered by
ddkasa
Jul 1, 2025
Replies: 1 comment 8 replies
-
You can implement a https://textual.textualize.io/guide/actions/#dynamic-actions |
Beta Was this translation helpful? Give feedback.
8 replies
Answer selected by
willmcgugan
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can implement a
check_action
method. Just returnFalse
orNone
depending on the action, and it will disable theBinding
.https://textual.textualize.io/guide/actions/#dynamic-actions
https://textual.textualize.io/api/dom_node/#textual.dom.DOMNode.check_action