fix: clicking on an empty :node many or :date many fails

hard in table. Also display date-picker for empty :date :many to allow
for more input
pull/11451/head
Gabriel Horner 2024-07-31 17:29:27 -04:00
parent 0c03b7a1f2
commit d5e7243f40
1 changed files with 5 additions and 2 deletions

View File

@ -349,7 +349,8 @@
(let [result (rum/react *result)]
(if (empty? result)
(let [v (get block (:db/ident property))]
(if (every? de/entity? v) v [v]))
(remove #(= :logseq.property/empty-placeholder (:db/ident %))
(if (every? de/entity? v) v [v])))
(remove (fn [node]
(or (= (:db/id block) (:db/id node))
;; A page's alias can't be itself
@ -818,7 +819,9 @@
(when date?
[(property-value-date-picker block property nil {:toggle-fn toggle-fn})]))
(when-not editing?
(property-empty-text-value))))]))))
(if date?
[(property-empty-text-value) (property-value-date-picker block property nil {:toggle-fn toggle-fn})]
(property-empty-text-value)))))]))))
(rum/defc multiple-values < rum/reactive db-mixins/query
[block property opts schema]