use submit blur for quick settings textbox

This commit is contained in:
w-e-w 2023-07-12 23:30:22 +09:00
parent e5ca987778
commit ea49bb0612
1 changed files with 14 additions and 7 deletions

View File

@ -260,8 +260,15 @@ class UiSettings:
component = self.component_dict[k] component = self.component_dict[k]
info = opts.data_labels[k] info = opts.data_labels[k]
change_handler = component.release if hasattr(component, 'release') else component.change if isinstance(component, gr.Textbox):
change_handler( methods = [component.submit, component.blur]
elif hasattr(component, 'release'):
methods = [component.release]
else:
methods = [component.change]
for method in methods:
method(
fn=lambda value, k=k: self.run_settings_single(value, key=k), fn=lambda value, k=k: self.run_settings_single(value, key=k),
inputs=[component], inputs=[component],
outputs=[component, self.text_settings], outputs=[component, self.text_settings],