Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Select widget "disabled" #4131

Closed
kce0002 opened this issue Feb 7, 2024 · 1 comment
Closed

Select widget "disabled" #4131

kce0002 opened this issue Feb 7, 2024 · 1 comment

Comments

@kce0002
Copy link

kce0002 commented Feb 7, 2024

Some background:
I am trying to disable the Select widget at runtime, and then re-enable it when a function is complete. I am capturing the event of the Select being changed and I don't want that event to fire while this function is executing. When I create the Select in my on_mount method, I give the widget an ID so I can reference it later. This is also the only Select widget in this application.

Here is the issue:
It seems like both query_one and get_widget_by_id are blocking when trying to find my Select widget. I am trying both of these methods and I get the same result (application essentially stalled):

self.get_widget_by_id("my_select").disabled = True
# OR
self.query_one(Select).disabled = True

It should also be noted that I am creating the select with the following call (perhaps this is the issue):

Select.from_values(my_values, id="my_select", classes="myclass")

Other info:
Using either of these methods works with other widgets, just not my case for Select.

@kce0002
Copy link
Author

kce0002 commented Feb 7, 2024

I should also mention I am using python 3.9.14 on RHEL 9.1 and textual 0.47.1

@Textualize Textualize deleted a comment from github-actions bot Feb 7, 2024
@Textualize Textualize locked and limited conversation to collaborators Feb 7, 2024
@davep davep converted this issue into discussion #4132 Feb 7, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant