mirror of https://github.com/logseq/logseq
Add logging to highlight query
parent
6247cc35fe
commit
145c519e1a
|
@ -95,12 +95,18 @@
|
||||||
:else
|
:else
|
||||||
[:span text])))))
|
[:span text])))))
|
||||||
|
|
||||||
|
(defn highlight-query-builder-with-log [props app-config query text]
|
||||||
|
(js/console.log "highlight-query" query text (clj->js props))
|
||||||
|
(let [result (highlight-query* app-config query text)]
|
||||||
|
(js/console.log "highlight-query.result" (pr-str result))
|
||||||
|
result))
|
||||||
|
|
||||||
|
|
||||||
;; result-item
|
;; result-item
|
||||||
(rum/defc root [{:keys [icon icon-theme query text info shortcut value-label value title highlighted on-highlight on-highlight-dep header on-click]}
|
(rum/defc root [{:keys [icon icon-theme query text info shortcut value-label value title highlighted on-highlight on-highlight-dep header on-click] :as props}
|
||||||
{:keys [app-config] :as context}]
|
{:keys [app-config] :as context}]
|
||||||
(let [ref (rum/create-ref)
|
(let [ref (rum/create-ref)
|
||||||
highlight-query (partial highlight-query* app-config query)]
|
highlight-query (partial highlight-query-builder-with-log props app-config query)]
|
||||||
(rum/use-effect!
|
(rum/use-effect!
|
||||||
(fn []
|
(fn []
|
||||||
(when (and highlighted on-highlight)
|
(when (and highlighted on-highlight)
|
||||||
|
|
Loading…
Reference in New Issue