diff --git a/frontend/src/app/main/ui/components/numeric_input.cljs b/frontend/src/app/main/ui/components/numeric_input.cljs index 33e0ef881c..5f5158aaf6 100644 --- a/frontend/src/app/main/ui/components/numeric_input.cljs +++ b/frontend/src/app/main/ui/components/numeric_input.cljs @@ -162,5 +162,12 @@ (obj/set! "onKeyDown" handle-key-down) (obj/set! "onBlur" handle-blur))] + (mf/use-effect + (mf/deps value-str) + (fn [] + (when-let [input-node (mf/ref-val ref)] + (when-not (dom/active? input-node) + (dom/set-value! input-node value-str))))) + [:> :input props])) diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/menus/frame_grid.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/menus/frame_grid.cljs index b7933d320b..0fa376e891 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/menus/frame_grid.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/menus/frame_grid.cljs @@ -64,7 +64,6 @@ (fn [value] (on-change (assoc-in grid keys-path value)))) - ;; TODO: remove references to :auto handle-change-size (mf/use-fn (mf/deps grid) @@ -75,7 +74,6 @@ (-> (gg/calculate-default-item-length frame-length margin gutter) (mth/precision 2)) item-length)] - (-> grid (update :params assoc :size size :item-length item-length) (on-change)))))