mirror of
https://github.com/penpot/penpot.git
synced 2026-05-24 09:23:40 +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)]
|
||||
(if token
|
||||
(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?
|
||||
(if is-open
|
||||
@ -705,7 +706,9 @@
|
||||
token-props
|
||||
(when (and token-applied-name (not= :multiple 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)
|
||||
token-value (or (get token :resolved-value)
|
||||
(or (mf/ref-val last-value*)
|
||||
|
||||
@ -205,8 +205,6 @@
|
||||
(when (some? on-reorder)
|
||||
[:> reorder-handler* {:ref dref}])
|
||||
|
||||
(prn "stroke-row*" applied-tokens)
|
||||
|
||||
;; Stroke Color
|
||||
;; FIXME: memorize stroke color
|
||||
[:div {:class (stl/css :stroke-color-actions)}
|
||||
|
||||
@ -39,9 +39,17 @@
|
||||
(not-empty)))))
|
||||
|
||||
(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]
|
||||
(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
|
||||
[tokens filter-text]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user