-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Getting very inconsistent behavior with the new Select Widged when using their .set_options. Often after the options stay empty, depending on if the Select was used before, an item was selected before or not, or the options before where empy ([]).
from textual import on
from textual.app import App, ComposeResult
from textual.widgets import Select, Button
class SelectBug(App):
def compose(self) -> ComposeResult:
self.select = Select(options=[("empty", 0)])
yield self.select
yield Button("Change Options", id="change_options")
@on(Button.Pressed, "#change_options")
def change_options(self, event):
self.select.set_options([("Four", 4), ("Five", 5), ("Six", 6)])
if __name__ == "__main__":
app = SelectBug()
app.run()Keep the great work up!
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working