Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enhancement: support row on click in nested-grid like in simple-v-table #344

Open
hipitihop opened this issue Oct 1, 2024 · 3 comments
Open
Assignees

Comments

@hipitihop
Copy link
Contributor

simple-v-table has an on-click handler which dumps the row object to the devtools console. This is super useful when debugging these tables and one can see other row properties which may not be directly displayed.

Can this be implemented in the new nested-grid too please ?

:on-click (handler-fn (do (v-table/show-row-data-on-alt-click row row-index event)
(when on-click-row (on-click-row row-index))))

@hipitihop
Copy link
Contributor Author

hipitihop commented Oct 1, 2024

Thanks for this @kimo-k Is it possible the console dump can also be raw, like simple-v-table does ? For larger entities, it's its nice to leverage devtools which allows navigating and expanding in the console, as opposed to just a pr-str, although I'm sure there may be people that like the plain pr-str too. Maybe a param :debug-click-fmt or callback ? Your comment mentions goog.DEBUG but I have found this feature useful in advanced compiled releases too, so I think it should be up to the consumer to configure this accordingly. e.g. in our apps we often use dev=true query param to enable such features

@kimo-k kimo-k reopened this Oct 2, 2024
@kimo-k
Copy link
Contributor

kimo-k commented Oct 2, 2024

Ok, sounds like we can enable alt-click logging when (or debug-click? goog.DEBUG). And let debug-click-fmt declare what type of logging to do.

@kimo-k
Copy link
Contributor

kimo-k commented Oct 2, 2024

I remember building a global option for 10x:

image

A similar DX would be nice for re-com, configured using :closure-defines. That way, we could configure all the components at once. We could still provide a local config to any single component instance, but in many cases, it would be nice if we don't need to bother doing that.

Thinking a bit bigger, it might be nice to simply have every part in every component be able to spit out its props when alt-clicked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants