diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/menus/component.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/menus/component.cljs index 6bb5274dd..a1dcb8ddb 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/menus/component.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/menus/component.cljs @@ -286,7 +286,8 @@ (mf/use-fn (mf/deps component-ids) (fn [pos value] - (let [value (if (= value empty-indicator) "" value)] + (let [value (str/trim value) + value (if (= value empty-indicator) "" value)] (doseq [id component-ids] (st/emit! (dwv/update-property-value id pos value)) (st/emit! (dwv/update-error id nil)))))) @@ -295,11 +296,12 @@ (mf/use-fn (mf/deps variant-id) (fn [event] - (let [value (dom/get-target-val event) + (let [value (str/trim (dom/get-target-val event)) pos (-> (dom/get-current-target event) (dom/get-data "position") int)] - (st/emit! (dwv/update-property-name variant-id pos value)))))] + (when (seq value) + (st/emit! (dwv/update-property-name variant-id pos value))))))] [:* [:div {:class (stl/css :variant-property-list)}