mirror of
https://github.com/logseq/logseq.git
synced 2026-06-01 19:01:22 +00:00
fix: fixes bug with unusuable :default property
Part of LOG-2953. Also fixes bug when a new property first displays configure modal and incorrectly shows cardinality for :default property
This commit is contained in:
@@ -188,11 +188,16 @@
|
||||
[:div.col-span-2
|
||||
(ui/select schema-types
|
||||
(fn [_e v]
|
||||
(let [type (keyword (string/lower-case v))]
|
||||
(swap! *property-schema assoc :type type)
|
||||
(let [type (keyword (string/lower-case v))
|
||||
update-schema-fn (comp
|
||||
(if (contains? db-property-type/property-types-with-cardinality type)
|
||||
identity
|
||||
#(dissoc % :cardinality))
|
||||
#(assoc % :type type))]
|
||||
(swap! *property-schema update-schema-fn)
|
||||
(components-pu/update-property! property @*property-name @*property-schema))))]))]
|
||||
|
||||
(when-not (contains? #{:checkbox :default :template} (:type @*property-schema))
|
||||
(when (contains? db-property-type/property-types-with-cardinality (:type @*property-schema))
|
||||
[:div.grid.grid-cols-4.gap-1.items-center.leading-8
|
||||
[:label "Multiple values:"]
|
||||
(let [many? (boolean (= :many (:cardinality @*property-schema)))]
|
||||
|
||||
Reference in New Issue
Block a user