Options Creator: bind free text set_value to text instead of on_text_validate (#5915)

This commit is contained in:
EdricY
2026-03-30 08:25:25 -07:00
committed by GitHub
parent bdbf72f148
commit ba7ca0bd23

View File

@@ -384,10 +384,11 @@ class OptionsCreator(ThemedApp):
def create_free_text(self, option: typing.Type[FreeText] | typing.Type[TextChoice], name: str):
text = VisualFreeText(option=option, name=name)
def set_value(instance):
self.options[name] = instance.text
def set_value(instance, value):
self.options[name] = value
text.bind(on_text_validate=set_value)
text.bind(text=set_value)
self.options[name] = option.default
return text
def create_choice(self, option: typing.Type[Choice], name: str):