cognitect-labs / REBL-distro

REBL-distro
368 stars 9 forks source link

Nav is called upon row focus #44

Open wilkerlucio opened 3 years ago

wilkerlucio commented 3 years ago

I was playing with the nav I noticed that REBL triggers nav upon row selection on the table view. Given the purpose of nav is to do lazy navigation, triggering nav on focus is unexpected.

Repro case:

(with-meta {:a 1} {`p/datafy (fn [x] (with-meta x {`p/nav (fn [c k v] (println 'nav c k v) v)}))})

When you log this structure, it does the print immediately, before navigating to it. This may cause long wait times if the navigation of the first key is some complex operation.