mirror of
https://github.com/logseq/logseq.git
synced 2026-06-01 19:01:22 +00:00
Replace enum type with available choices (#10438)
* Add type schema for enum values * Refactor: closed values instead of enum to limit values There's no need to add the enum type, we just want to limit the values. * feat: :page type supports closed values * fix: can't set property values for text/number types * fix: don't trigger on-chosen when unmounting any select component * fix: can't apply both page classes limitation and closed values * fix: merge conflicts * fix: ui not refresh when changing closed value * fix: can't set icon for closed value
This commit is contained in:
@@ -305,14 +305,14 @@
|
||||
truncate-blocks-tx-data (mapv
|
||||
(fn [block]
|
||||
[:db.fn/retractEntity [:block/uuid (:block/uuid block)]])
|
||||
blocks)]
|
||||
(if-let [msg (and (config/db-based-graph? repo)
|
||||
(page-unable-to-delete repo page))]
|
||||
blocks)
|
||||
db-based? (config/db-based-graph? repo)]
|
||||
(if-let [msg (and db-based? (page-unable-to-delete repo page))]
|
||||
(do
|
||||
(db/transact! repo truncate-blocks-tx-data
|
||||
{:outliner-op :delete-page :persist-op? persist-op?})
|
||||
{:outliner-op :delete-page :persist-op? persist-op?})
|
||||
(error-handler msg))
|
||||
(let [_ (delete-file! repo page-name delete-file?)
|
||||
(let [_ (when-not db-based? (delete-file! repo page-name delete-file?))
|
||||
;; if other page alias this pagename,
|
||||
;; then just remove some attrs of this entity instead of retractEntity
|
||||
delete-page-tx (cond
|
||||
|
||||
Reference in New Issue
Block a user