🐛 Fix collapsed fills section on text shapes (#10972)

This commit is contained in:
Belén Albeza 2026-07-31 10:29:26 +02:00 committed by GitHub
parent 9b0be1c750
commit 7fa6631005
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -84,8 +84,10 @@
empty-fills? (and (not multiple?)
(= 0 (count fills)))
open* (mf/use-state has-fills?)
open? (deref open*)
;; Derive the open state from `has-fills?` on every render so it stays
;; in sync even when the fills arrive after mount (editor v3)
open* (mf/use-state true)
open? (and has-fills? (deref open*))
toggle-content (mf/use-fn #(swap! open* not))
open-content (mf/use-fn #(reset! open* true))