-
Notifications
You must be signed in to change notification settings - Fork 6.8k
refactor(aria/grid): rework cell widget and wrap continuous behavior #32290
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
Conversation
|
Deployed dev-app for 3c00f96 to: https://ng-dev-previews-comp--pr-angular-components-32290-dev-ae8kdl6n.web.app Note: As new commits are pushed to this pull request, this link is updated after the preview is rebuilt. |
2cc7dcf to
61d1587
Compare
6949820 to
ff6f7e5
Compare
| <div | ||
| role="button" | ||
| ngGridCellWidget | ||
| widgetType="editable" | ||
| (onActivate)="startEdit($event, task, summaryInput)" | ||
| (onDeactivate)="completeEdit($event, task)" | ||
| (click)="widget.activate()" | ||
| #widget="ngGridCellWidget" | ||
| > |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the reason for having the user call widget.activate() on click instead of this being handled internally?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't add that because I've seen some data table design (like Google Sheets) requires double click to enter the edit mode, and I also don't know if clicking on an input box should activate the widget, or wait until user typing. in fact I was event tempting to use (dblclick) event here instead of (click) for something that's editable.
| } | ||
|
|
||
| /** Resets the active state of the grid if it is empty or stale. */ | ||
| resetStateEffect(): void { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like we are doing a lot of special casing to handle deletions or reordering. I am wondering if there is an alternative approach we can consider that handles these cases more gracefully
One thing to consider is whether shifting some of the state-fixing responsibility to the developer would remove a lot of these special checks we are doing
6135239 to
626dce8
Compare
Added grid table example and improved grid calendar example.