mirror of
https://github.com/penpot/penpot.git
synced 2026-05-24 17:33:41 +00:00
🐛 Fix typing full token name on numeric input (#9725)
This commit is contained in:
parent
3e2b00b97f
commit
f1c0ea2a19
@ -433,7 +433,8 @@
|
|||||||
token (get-option-by-name options name)]
|
token (get-option-by-name options name)]
|
||||||
(if token
|
(if token
|
||||||
(apply-token (:resolved-value token) name)
|
(apply-token (:resolved-value token) name)
|
||||||
(apply-value (mf/ref-val last-value*)))))
|
(apply-value (mf/ref-val last-value*))))
|
||||||
|
(reset! is-open* false))
|
||||||
|
|
||||||
enter?
|
enter?
|
||||||
(if is-open
|
(if is-open
|
||||||
@ -705,7 +706,9 @@
|
|||||||
token-props
|
token-props
|
||||||
(when (and token-applied-name (not= :multiple token-applied-name))
|
(when (and token-applied-name (not= :multiple token-applied-name))
|
||||||
(let [token (get-option-by-name dropdown-options token-applied-name)
|
(let [token (get-option-by-name dropdown-options token-applied-name)
|
||||||
id (get token :id)
|
id (or (get token :id)
|
||||||
|
(some-> (get token-applied :id)
|
||||||
|
(dm/str)))
|
||||||
label (or (get token :name) applied-token-name)
|
label (or (get token :name) applied-token-name)
|
||||||
token-value (or (get token :resolved-value)
|
token-value (or (get token :resolved-value)
|
||||||
(or (mf/ref-val last-value*)
|
(or (mf/ref-val last-value*)
|
||||||
|
|||||||
@ -205,8 +205,6 @@
|
|||||||
(when (some? on-reorder)
|
(when (some? on-reorder)
|
||||||
[:> reorder-handler* {:ref dref}])
|
[:> reorder-handler* {:ref dref}])
|
||||||
|
|
||||||
(prn "stroke-row*" applied-tokens)
|
|
||||||
|
|
||||||
;; Stroke Color
|
;; Stroke Color
|
||||||
;; FIXME: memorize stroke color
|
;; FIXME: memorize stroke color
|
||||||
[:div {:class (stl/css :stroke-color-actions)}
|
[:div {:class (stl/css :stroke-color-actions)}
|
||||||
|
|||||||
@ -39,9 +39,17 @@
|
|||||||
(not-empty)))))
|
(not-empty)))))
|
||||||
|
|
||||||
(defn- extract-partial-brace-text
|
(defn- extract-partial-brace-text
|
||||||
|
"Returns the substring after the last '{' in s. If the resulting
|
||||||
|
substring ends with '}', that trailing brace is removed.
|
||||||
|
Returns nil if no '{' is found or s is nil."
|
||||||
[s]
|
[s]
|
||||||
(when-let [start (str/last-index-of s "{")]
|
(when-let [start (str/last-index-of s "{")]
|
||||||
(subs s (inc start))))
|
(let [partial (subs s (inc start))]
|
||||||
|
(if (and (seq partial)
|
||||||
|
(> (count partial) 0)
|
||||||
|
(= "}" (subs partial (dec (count partial)))))
|
||||||
|
(subs partial 0 (dec (count partial)))
|
||||||
|
partial))))
|
||||||
|
|
||||||
(defn- filter-token-groups-by-name
|
(defn- filter-token-groups-by-name
|
||||||
[tokens filter-text]
|
[tokens filter-text]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user