mirror of https://github.com/logseq/logseq
fix: can't switch back to single input value for :default property
https://linear.app/logseq/issue/LOG-2810/cant-switch-back-to-single-input-value-for-default-propertypull/10438/head
parent
73c5930672
commit
5cc4c4b676
|
@ -292,7 +292,8 @@
|
|||
empty-block? (or (nil? parent) (zero? children-count))]
|
||||
(when empty-block?
|
||||
(when parent
|
||||
(db/transact! repo [[:db/retractEntity (:db/id parent)]]))
|
||||
(db/transact! repo [[:db/retractEntity (:db/id parent)]]
|
||||
{:outliner-op :delete-blocks}))
|
||||
(property-handler/delete-property-value! repo block (:block/uuid property) value))
|
||||
(when (seq children)
|
||||
[:div.property-block-container.w-full
|
||||
|
|
|
@ -353,8 +353,12 @@
|
|||
:block/properties properties'
|
||||
:block/refs refs}]
|
||||
{:outliner-op :save-block}))
|
||||
;; remove block property if cardinality is not many
|
||||
(remove-block-property! repo (:block/uuid block) property-id))))))))
|
||||
(if (= :default (get-in property [:block/schema :type]))
|
||||
(set-block-property! repo (:block/uuid block)
|
||||
(:block/original-name property)
|
||||
""
|
||||
{})
|
||||
(remove-block-property! repo (:block/uuid block) property-id)))))))))
|
||||
|
||||
(defn replace-key-with-id!
|
||||
"Notice: properties need to be created first"
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
(pipelines/invoke-hooks tx-report)
|
||||
|
||||
(when (or (:outliner/transact? tx-meta)
|
||||
(:outliner-op tx-meta)
|
||||
(:whiteboard/transact? tx-meta))
|
||||
(undo-redo/listen-db-changes! tx-report))
|
||||
|
||||
|
|
Loading…
Reference in New Issue