Skip to content
Discussion options

You must be logged in to vote

Two solutions come to mind. You could use a local import.

    def action_cancel(self) -> None:
        from example_list import ExampleList
        self.value = ""`
        self.app.query_one(ExampleList).focus()

Or you could specify the query as a string, which means you wouldn't strictly need to import anything.

    def action_cancel(self) -> None:
        self.value = ""`
        self.app.query_one("ExampleList").focus()

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by TomJGooding
Comment options

TomJGooding
Feb 25, 2023
Collaborator Author

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants