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

Remove props to implement subrows #1853

Merged
merged 4 commits into from
Jan 2, 2020
Merged

Remove props to implement subrows #1853

merged 4 commits into from
Jan 2, 2020

Conversation

amanmahajan7
Copy link
Contributor

@amanmahajan7 amanmahajan7 commented Dec 23, 2019

  • Remove SubRow props
    • getSubRowDetails
    • onCellExpand
    • onDeleteSubRow
    • onAddSubRow - this prop was not used
  • Update TreeView example and implement subrows without the above props. SubRows implementation felt too complicated and I ended up using a simpler model
  • Combine TreeView and TreeViewNoDelete examples
  • Tsify CellActions example

Next step is to replace defaultCellContentRenderer with defaultFormatter

@amanmahajan7 amanmahajan7 marked this pull request as ready for review January 2, 2020 15:47
Copy link
Contributor

@nstepien nstepien left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great overall

examples/demos/formatters/CellActionsFormatter.tsx Outdated Show resolved Hide resolved
<DataGrid<Row, 'id'>
enableCellSelect
columns={columns}
rowGetter={i => rows[i]}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't matter too much for demos, but we should avoid passing new functions on each render to DataGrid.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am thinking of using eventBus more aggressively and avoid passing callbacks down. I have a few ideas that we can discuss next week

examples/demos/example25-tree-view.tsx Outdated Show resolved Hide resolved
examples/demos/example25-tree-view.tsx Outdated Show resolved Hide resolved
examples/demos/example25-tree-view.tsx Outdated Show resolved Hide resolved
@nstepien nstepien merged commit 2f7ab32 into pre-canary Jan 2, 2020
@nstepien nstepien deleted the am-kill-subrows branch January 2, 2020 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants