Pārlūkot izejas kodu

fix: property value

Tienson Qin 1 gadu atpakaļ
vecāks
revīzija
e94d4fdb0e

+ 2 - 2
src/main/frontend/components/property.cljs

@@ -433,7 +433,7 @@
                      (reset! *property-key nil))
                    state)}
   shortcut/disable-all-shortcuts
-  [state entity *property-key *property-value {:keys [class-schema? in-block-container? page? page-configure?]
+  [state entity *property-key {:keys [class-schema? in-block-container? page? page-configure?]
                                                :as opts}]
   (let [*show-new-property-config? (::show-new-property-config? state)
         *property-schema (::property-schema state)
@@ -465,7 +465,7 @@
                                            :block entity
                                            :*show-new-property-config? *show-new-property-config?}))
              (when (and property (not class-schema?))
-               (pv/property-value entity property @*property-value (assoc opts :editing? true))))]])
+               (pv/property-value entity property (get entity (:db/ident property)) (assoc opts :editing? true))))]])
 
        (let [on-chosen (fn [{:keys [value label]}]
                          (reset! *property-key (if (uuid? value) label value))

+ 2 - 3
src/main/frontend/components/property/dialog.cljs

@@ -8,7 +8,6 @@
   {:init (fn [state]
            (assoc state ::property-key (atom (:property-key (last (:rum/args state))))))}
   [state block opts]
-  (let [*property-key (::property-key state)
-        *property-value (::property-value state)]
+  (let [*property-key (::property-key state)]
     [:div.ls-property-dialog
-     (property-component/property-input block *property-key *property-value opts)]))
+     (property-component/property-input block *property-key opts)]))

+ 2 - 1
src/main/frontend/components/property/value.css

@@ -4,6 +4,7 @@
 
 .ls-property-dialog {
     .ls-property-key {
-        min-height: 286px;
+        @apply overflow-y-hidden;
+        height: 286px;
     }
 }