Skip to content

Commit

Permalink
fix: new property config modal crashes
Browse files Browse the repository at this point in the history
Fixes logseq/db-test#38 and logseq/db-test#39. Caused by component
name clashing with local binding. Linter should be able to catch this
...
  • Loading branch information
logseq-cldwalker committed Aug 23, 2024
1 parent 748a5d6 commit 2f8e9fa
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions src/main/frontend/components/property.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@
(db/entity (:db/id result))))
(notification/show! "This is an invalid property name. A property name cannot start with page reference characters '#' or '[['." :error)))))

(rum/defcs property-type <
(rum/defcs property-type-select <
shortcut/disable-all-shortcuts
[state property {:keys [*property *property-name *property-schema built-in? disabled?
show-type-change-hints? block *show-new-property-config?
Expand Down Expand Up @@ -343,12 +343,12 @@
:interactive true
:disabled false}
(svg/help-circle))]
(property-type property {:*property-name *property-name
:*property-schema *property-schema
:built-in? built-in?
:disabled? disabled?
:show-type-change-hints? true
:*show-class-select? *show-class-select?}))]
(property-type-select property {:*property-name *property-name
:*property-schema *property-schema
:built-in? built-in?
:disabled? disabled?
:show-type-change-hints? true
:*show-class-select? *show-class-select?}))]

(when (db-property-type/property-type-allows-schema-attribute? (:type @*property-schema) :classes)
(case (:type @*property-schema)
Expand Down Expand Up @@ -581,14 +581,14 @@
(when (not= @*show-new-property-config? :adding-property)
(cond
@*show-new-property-config?
(property-type property (merge opts
{:*property *property
:*property-name *property-key
:*property-schema *property-schema
:default-open? true
:block block
:*show-new-property-config? *show-new-property-config?
:*show-class-select? *show-class-select?}))
(property-type-select property (merge opts
{:*property *property
:*property-name *property-key
:*property-schema *property-schema
:default-open? true
:block block
:*show-new-property-config? *show-new-property-config?
:*show-class-select? *show-class-select?}))

(and property @*show-class-select?)
(class-select property (assoc opts
Expand Down

0 comments on commit 2f8e9fa

Please sign in to comment.