mirror of
https://github.com/penpot/penpot.git
synced 2026-09-19 02:16:14 +00:00
🐛 Fix allow spaces on token description (#8234)
This commit is contained in:
parent
84b3f5d7c6
commit
852b31c3a0
@ -39,6 +39,7 @@
|
|||||||
- Fix several race conditions on path editor [Github #8187](https://github.com/penpot/penpot/pull/8187)
|
- Fix several race conditions on path editor [Github #8187](https://github.com/penpot/penpot/pull/8187)
|
||||||
- Fix app freeze when introducing an error on a very long token name [Taiga #13214](https://tree.taiga.io/project/penpot/issue/13214)
|
- Fix app freeze when introducing an error on a very long token name [Taiga #13214](https://tree.taiga.io/project/penpot/issue/13214)
|
||||||
- Fix import a file with shadow tokens [Taiga #13229](https://tree.taiga.io/project/penpot/issue/13229)
|
- Fix import a file with shadow tokens [Taiga #13229](https://tree.taiga.io/project/penpot/issue/13229)
|
||||||
|
- Fix allow spaces on token description [Taiga #13184](https://tree.taiga.io/project/penpot/issue/13184)
|
||||||
|
|
||||||
## 2.12.1
|
## 2.12.1
|
||||||
|
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
(def context (mf/create-context nil))
|
(def context (mf/create-context nil))
|
||||||
|
|
||||||
(mf/defc form-input*
|
(mf/defc form-input*
|
||||||
[{:keys [name] :rest props}]
|
[{:keys [name trim] :rest props}]
|
||||||
|
|
||||||
(let [form (mf/use-ctx context)
|
(let [form (mf/use-ctx context)
|
||||||
input-name name
|
input-name name
|
||||||
@ -33,7 +33,7 @@
|
|||||||
(mf/deps input-name)
|
(mf/deps input-name)
|
||||||
(fn [event]
|
(fn [event]
|
||||||
(let [value (-> event dom/get-target dom/get-input-value)]
|
(let [value (-> event dom/get-target dom/get-input-value)]
|
||||||
(fm/on-input-change form input-name value true))))
|
(fm/on-input-change form input-name value trim))))
|
||||||
|
|
||||||
props
|
props
|
||||||
(mf/spread-props props {:on-change on-change
|
(mf/spread-props props {:on-change on-change
|
||||||
|
|||||||
@ -230,6 +230,7 @@
|
|||||||
:placeholder (tr "workspace.tokens.enter-token-name" token-title)
|
:placeholder (tr "workspace.tokens.enter-token-name" token-title)
|
||||||
:max-length max-input-length
|
:max-length max-input-length
|
||||||
:variant "comfortable"
|
:variant "comfortable"
|
||||||
|
:trim true
|
||||||
:auto-focus true}]
|
:auto-focus true}]
|
||||||
|
|
||||||
(when (and warning-name-change? (= action "edit"))
|
(when (and warning-name-change? (= action "edit"))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user