mirror of https://github.com/logseq/logseq
fix: sorting for keyword columns
parent
70b685f279
commit
775a38f91d
|
@ -185,9 +185,10 @@
|
|||
:background-color {:schema {:type :default}}
|
||||
:heading {:schema {:type :any}} ; number (1-6) or boolean for auto heading
|
||||
:query-table {:schema {:type :checkbox}}
|
||||
;; query-properties is a coll of property uuids and keywords where keywords are special frontend properties
|
||||
;; query-properties is a coll of property uuids and keywords where keywords are special frontend keywords
|
||||
:query-properties {:schema {:type :coll}}
|
||||
:query-sort-by {:schema {:type :checkbox}}
|
||||
;; query-sort-by is either a property uuid or a keyword where keyword is a special frontend keyword
|
||||
:query-sort-by {:schema {:type :any}}
|
||||
:query-sort-desc {:schema {:type :checkbox}}
|
||||
:logseq.query/nlp-date {:schema {:type :checkbox}}
|
||||
:ls-type {:schema {:type :keyword}}
|
||||
|
|
|
@ -90,7 +90,7 @@
|
|||
(let [repo (state/get-current-repo)]
|
||||
[:th.whitespace-nowrap
|
||||
[:a {:on-click (fn []
|
||||
(property-handler/set-block-property! repo block-id :query-sort-by (name column))
|
||||
(property-handler/set-block-property! repo block-id :query-sort-by (if (uuid? column) uuid (name column)))
|
||||
(property-handler/set-block-property! repo block-id :query-sort-desc (not sort-desc?)))}
|
||||
[:div.flex.items-center
|
||||
[:span.mr-1 title]
|
||||
|
|
|
@ -82,7 +82,7 @@
|
|||
(if (and (not (string? v-str)) (not (object? v-str)))
|
||||
v-str
|
||||
(case schema-type
|
||||
:default
|
||||
(:default :any :url)
|
||||
v-str
|
||||
|
||||
:number
|
||||
|
@ -102,9 +102,7 @@
|
|||
|
||||
:date
|
||||
v-str ; uuid
|
||||
|
||||
:url
|
||||
v-str)))
|
||||
)))
|
||||
|
||||
(defn upsert-property!
|
||||
[repo k-name schema {:keys [property-uuid]}]
|
||||
|
|
Loading…
Reference in New Issue