SmythOS Studio: Open-Source Visual AI Agent Builder and deployable runtime stack from SmythOS. Start with an intuitive drag-and-drop workspace, extend with custom code, and deploy your agents anywhere — local, cloud, or edge — with full governance and control.
JavaScript a2aagentic-aiai-agentsdevtoolsmcp-clientn8n-alternativeno-codeopen-sourceorchestrationsmythosvisual-builder
Enhance change detection in Component class by adding property check for entries. Refactor event listener setup in sidebarEditValues function for improved readability and maintainability.
Muhammad Hamza Khan0abe3cb059a0
diff --git a/packages/app/src/builder-ui/components/Component.class/index.ts b/packages/app/src/builder-ui/components/Component.class/index.tsindex 27f22bba..762a640c 100644--- a/packages/app/src/builder-ui/components/Component.class/index.ts+++ b/packages/app/src/builder-ui/components/Component.class/index.ts@@ -1780,6 +1780,12 @@ export class Component extends EventEmitter {!isEqual(templateData[name], values[name]))return true;++ if (+ Object.prototype.hasOwnProperty.call(entries, name) &&+ !isEqual(entries[name]?.value, values[name])+ )+ return true;}} else {for (let name in entries) {diff --git a/packages/app/src/builder-ui/ui/dialogs.ts b/packages/app/src/builder-ui/ui/dialogs.tsindex a4c0450e..e0c60810 100644--- a/packages/app/src/builder-ui/ui/dialogs.ts+++ b/packages/app/src/builder-ui/ui/dialogs.ts@@ -1173,20 +1173,28 @@ export function sidebarEditValues({}, 300);// Listen for immediate input changes (text inputs, textareas)- _form.addEventListener('input', (event: Event) => {- const target = event.target as HTMLElement;- if (target.matches('input:not([type="checkbox"]):not([type="radio"]), textarea')) {- debouncedDraft();- }- }, true);+ _form.addEventListener(+ 'input',+ (event: Event) => {+ const target = event.target as HTMLElement;+ if (target.matches('input:not([type="checkbox"]):not([type="radio"]), textarea')) {+ debouncedDraft();+ }+ },+ true,+ );// Listen for committed changes (select, checkbox, radio)- _form.addEventListener('change', (event: Event) => {- const target = event.target as HTMLElement;- if (target.matches('select, input[type="checkbox"], input[type="radio"]')) {- debouncedDraft();- }- }, true);+ _form.addEventListener(+ 'change',+ (event: Event) => {+ const target = event.target as HTMLElement;+ if (target.matches('select, input[type="checkbox"], input[type="radio"]')) {+ debouncedDraft();+ }+ },+ true,+ );_form._init();forms[tab] = { form: _form, fields: formFields };