fix: file content cleared when onblur

This commit is contained in:
Tienson Qin
2022-12-20 07:16:43 +08:00
committed by Andelf
parent 396c42c9c5
commit 10704da424

View File

@@ -260,13 +260,14 @@
state)
:did-update (fn [state]
(reset! (:code-options state) (last (:rum/args state)))
(->> state
:rum/args
last
:lines
butlast
(string/join "")
(.setValue @(:editor-atom state)))
(when-not (:file? (first (:rum/args state)))
(->> state
:rum/args
last
:lines
butlast
(string/join "")
(.setValue @(:editor-atom state))))
state)}
[state _config id attr code _theme _options]
[:div.extensions__code