dropdown_widget: Refactor to use Class.

This commit is contained in:
Aman Agrawal
2023-07-19 19:39:53 +05:30
committed by Tim Abbott
parent d91d6d1fd1
commit 6efcb7a349
28 changed files with 363 additions and 305 deletions

View File

@@ -159,6 +159,8 @@ export function launch(conf: DialogWidgetConfig): void {
if ($(this).is("input[type='file']") && $(this).prop("files")?.length) {
// If the input is a file input and a file has been selected, set value to file object
current_values[property_name] = $(this).prop("files")[0];
} else if (property_name === "edit_bot_owner") {
current_values[property_name] = $(this).find(".dropdown_widget_value").text();
} else {
current_values[property_name] = $(this).val();
}