-
Notifications
You must be signed in to change notification settings - Fork 500
Callback for expand / collapse actions #186
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
Comments
@dyennam thanks for the feedback. this seems like a pretty reasonable request - but I'd like to avoid throwing events at the global scope (window). can you think of an alternative solution that would solve this issue for you? |
@mac-s-g |
@mac-s-g I have a slightly different use case that also needs a collapse/expand callback. I'm trying to put RJV in a table cell in react-virtualized Table, which needs row height explicitly calculated and set. So I basically need a callback any time RJV's height might change so I can recalculate parent's height accordingly. Perhaps onToggleCollapsed, and have toggleCollapsed (/src/js/components/DataTypes/Object.js#L82) trigger that. |
…state, name, namespace and rjvId.
…k. Removed rjvId as it appears to be more of an internal id that isn't exposed to consumers.
@alexanderabramov have you already used react-json-view with react-virtualized? |
Hello,
I am trying to find a way to have a callback every time the user tries to expand / collapse the view.
The problem I am trying to fix is that I have RJV show up on Material-UI Dialog view.
So when user expands the nested objects manually the view goes below the page. But If user clicks an expandAll button the view reRenders to center of page.
So is there a way i can have a call back every time the user click on expand/collapse so that i can call
window.dispatchEvent(new Event('resize'))
which will cause the view to rePosition itself.Expected View being: (When user performs expand all actions)

Manually Expanded it looks like: The contents at the bottom end are going below the screen.

Thank You
The text was updated successfully, but these errors were encountered: