Commit Graph

6 Commits

Author SHA1 Message Date
TomJGooding
72b319c32f feat(events): add control property to Enter and Leave
Enable Enter and Leave events to be used with the on decorator by
adding a control property.
2024-10-23 14:22:41 +01:00
Dave Pearson
474f2146d3 Swap to selecting on the pane for TabbedContent.TabActivated 2023-12-07 12:03:39 +00:00
Will McGugan
8947dbe703 on super class (#2746)
* on super class

* simplification

* simplify

* remove whitespace

* changelog

* changelog

* Update tests/test_on.py

Co-authored-by: darrenburns <darrenburns@users.noreply.github.com>

---------

Co-authored-by: darrenburns <darrenburns@users.noreply.github.com>
2023-06-07 13:43:12 +01:00
Rodrigo Girão Serrão
45686c8aca Fix tests. 2023-05-17 10:27:57 +01:00
Rodrigo Girão Serrão
855c90d4f0 Extend @on decorator to filter matchable attributes (#2498)
* Add tests for #2484.

* Implement @on extension.

[skip ci]
Related issues: #2484.

* Changelog.

* Add missing @on test.

* Remove debug prints.

* Document changes.

* Update tests.

Test now fully works, as of #2490.

* Cache parsed selectors.

* Streamline exit condition.

* Fix typing.

* More succint wording.

* Document 'on' kwargs.

* Update src/textual/_on.py

Co-authored-by: Will McGugan <willmcgugan@gmail.com>

* Update docs/guide/events.md

Co-authored-by: Will McGugan <willmcgugan@gmail.com>

* Change 'on' API.

* Remove example code.

* Address feedback.

* Update src/textual/_on.py

Co-authored-by: Will McGugan <willmcgugan@gmail.com>

* Address review feedback.

* Fix #2499.

* don't require control to be manually specified

* update docstring

* deleted words

---------

Co-authored-by: Will McGugan <willmcgugan@gmail.com>
2023-05-08 17:30:07 +01:00
Will McGugan
91a9d570a4 On decorator (#2453)
* Add on decorator

* decorator code

* docs for on decorator

* Examples

* test errors

* simplify listing

* words

* changelog

* Update docs/guide/events.md

Co-authored-by: Dave Pearson <davep@davep.org>

* Update docs/guide/events.md

Co-authored-by: Dave Pearson <davep@davep.org>

* Update docs/examples/events/on_decorator.css

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>

* Update docs/guide/events.md

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>

* rewording

* comment

* clarification

* Added note

---------

Co-authored-by: Dave Pearson <davep@davep.org>
Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>
2023-05-02 16:17:40 +01:00