Skip to content

Commit

Permalink
enhance: show tags table if objects have more than one tag
Browse files Browse the repository at this point in the history
  • Loading branch information
logseq-cldwalker committed Oct 21, 2024
1 parent 12b1f3e commit 43b0e68
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/main/frontend/components/objects.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@
[view-entity set-view-entity!] (rum/use-state class)
[views set-views!] (rum/use-state [class])
[data set-data!] (rum/use-state objects)
columns* (views/build-columns config properties {:add-tags-column? (= (:db/ident class) :logseq.class/Root)})
columns* (views/build-columns config properties {:add-tags-column? (or (= (:db/ident class) :logseq.class/Root)
(> (count (distinct (mapcat :block/tags objects))) 1))})
columns (cond
(= (:db/ident class) :logseq.class/Pdf-annotation)
(remove #(contains? #{:logseq.property/ls-type} (:id %)) columns*)
Expand Down
1 change: 0 additions & 1 deletion src/main/frontend/components/views.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
[clojure.set :as set]
[clojure.string :as string]
[datascript.impl.entity :as de]
[datascript.core :as d]
[frontend.components.dnd :as dnd]
[frontend.components.property.value :as pv]
[frontend.components.select :as select]
Expand Down

0 comments on commit 43b0e68

Please sign in to comment.