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

Is there currently anyway to programatically expand a specific row on load? #46

Closed
alexanderyhapcv opened this issue Feb 16, 2018 · 2 comments

Comments

@alexanderyhapcv
Copy link

No description provided.

@alexanderyhapcv alexanderyhapcv changed the title Is there currently anyway to expand a specific row on load? Is there currently anyway to programatically expand a specific row on load? Feb 16, 2018
@madmax983
Copy link
Owner

With the way it is currently setup, when you click on the Chevron a childToggle event is fired. This event is then handled in the data grid component to do the expanding and collapsing.

With the event being a component type, and not an application one, I don't believe you'll be able to fire it from above the hierarchy and have it be handled.

So the shorter answer is not right now, since that event is of a component type.

Two options to address this:

  1. Make the event an application type.
  2. Expose a public method on the grid, and bypass the event for this use case. I think this is my preferred solution. Something like grid.expand(row)

@madmax983
Copy link
Owner

As I was working on #47 this weekend I realized there is a way to do this, and you can see an example in the tests. Check out the child toggle test

It's a bit convoluted to be doing outside of a test, but if this was blocking you, it could be done as a workaround. There should totally be an easier way of doing this at the row level, and not the cell.

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