Open practicalli-johnny opened 1 year ago
Portal submit can include custom code
useful for values that don't support metadata directly but where you still want to customize display
Example conditionally add date
(defn ->date [value] ^{:portal.viewer/default :portal.viewer/hiccup} [:portal.viewer/relative-time value]) (defn my-submit [value] (p/submit (cond (date? value) (->date value) :else value))) (add-tap #'my-submit)
Portal submit can include custom code
useful for values that don't support metadata directly but where you still want to customize display
Example conditionally add date
Reference