From 01e963ae35b7737b282575857e3fb159a342a3ac Mon Sep 17 00:00:00 2001 From: Eva Marco Date: Tue, 16 Sep 2025 12:23:41 +0200 Subject: [PATCH] :bug: Fix font name hot update (#7316) --- .../main/ui/workspace/tokens/management/create/form.cljs | 4 ++-- .../tokens/management/create/input_tokens_value.cljs | 6 +----- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/frontend/src/app/main/ui/workspace/tokens/management/create/form.cljs b/frontend/src/app/main/ui/workspace/tokens/management/create/form.cljs index 3c83ac9c72..0b7ad911ce 100644 --- a/frontend/src/app/main/ui/workspace/tokens/management/create/form.cljs +++ b/frontend/src/app/main/ui/workspace/tokens/management/create/form.cljs @@ -828,7 +828,7 @@ custom-input-token-value-props: Custom props passed to the custom-input-token-va on-select-font (mf/use-fn - (mf/deps on-external-update-value set-font) + (mf/deps on-external-update-value set-font font) (fn [{:keys [family] :as font}] (when font (set-font font) @@ -854,7 +854,7 @@ custom-input-token-value-props: Custom props passed to the custom-input-token-va {:placeholder (or placeholder (tr "workspace.tokens.token-font-family-value-enter")) :label label :aria-label aria-label - :default-value default-value + :value (or (:name font) default-value) :ref input-ref :on-blur on-blur :on-change on-update-value' diff --git a/frontend/src/app/main/ui/workspace/tokens/management/create/input_tokens_value.cljs b/frontend/src/app/main/ui/workspace/tokens/management/create/input_tokens_value.cljs index 8502e981a9..9ab8d6f4ab 100644 --- a/frontend/src/app/main/ui/workspace/tokens/management/create/input_tokens_value.cljs +++ b/frontend/src/app/main/ui/workspace/tokens/management/create/input_tokens_value.cljs @@ -58,19 +58,15 @@ (mf/defc input-token* {::mf/forward-ref true ::mf/schema schema::input-token} - [{:keys [class label placeholder value icon slot-start token-resolve-result] :rest props} ref] + [{:keys [class label token-resolve-result] :rest props} ref] (let [error (not (nil? (:errors token-resolve-result))) id (mf/use-id) input-ref (mf/use-ref) props (mf/spread-props props {:id id :type "text" :class (stl/css :input) - :placeholder placeholder - :value value :variant "comfortable" :hint-type (when error "error") - :slot-start slot-start - :icon icon :ref (or ref input-ref)})] [:* [:div {:class (dm/str class " " (stl/css-case :wrapper true