Skip to content

Commit

Permalink
fix: save current block before opening date picker
Browse files Browse the repository at this point in the history
  • Loading branch information
tiensonqin committed Dec 29, 2024
1 parent ceb8849 commit 972e6e6
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/main/frontend/components/property/value.cljs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
(ns frontend.components.property.value
(:require [cljs-time.core :as t]
[cljs-time.coerce :as tc]
(:require [cljs-time.coerce :as tc]
[cljs-time.core :as t]
[clojure.set :as set]
[clojure.string :as string]
[datascript.impl.entity :as de]
[dommy.core :as d]
Expand Down Expand Up @@ -32,11 +33,10 @@
[logseq.db :as ldb]
[logseq.db.frontend.property :as db-property]
[logseq.db.frontend.property.type :as db-property-type]
[logseq.outliner.property :as outliner-property]
[logseq.shui.ui :as shui]
[promesa.core :as p]
[rum.core :as rum]
[clojure.set :as set]
[logseq.outliner.property :as outliner-property]))
[rum.core :as rum]))

(rum/defc property-empty-btn-value
[property & opts]
Expand Down Expand Up @@ -419,6 +419,7 @@
open-popup! (fn [e]
(when-not (or (util/meta-key? e) (util/shift-key? e))
(util/stop e)
(editor-handler/save-current-block!)
(when-not config/publishing?
(shui/popup-show! (.-target e) content-fn
{:align "start" :auto-focus? true}))))
Expand Down Expand Up @@ -492,7 +493,9 @@
:tags #{:logseq.class/Journal}}))
(property-handler/set-block-property! repo (:block/uuid block)
(:db/ident property)
(if (map? value) (:db/id value) value)))))
(if datetime?
value
(:db/id value))))))
:del-btn? (some? value)
:on-delete (fn []
(property-handler/set-block-property! repo (:block/uuid block)
Expand Down

0 comments on commit 972e6e6

Please sign in to comment.