-
Notifications
You must be signed in to change notification settings - Fork 2.1k
fix(list): Update default notifyAction impl to emit object #4356
Conversation
Fixes #4355 BREAKING CHANGE: The default `MDCListAdapter.notifyAction()` implementation now emits an object of type `{index: number}` rather than a primitive `number` directly.
Codecov Report
@@ Coverage Diff @@
## master #4356 +/- ##
=======================================
Coverage 98.56% 98.56%
=======================================
Files 130 130
Lines 5731 5731
Branches 763 763
=======================================
Hits 5649 5649
Misses 82 82
Continue to review full report at Codecov.
|
All 621 screenshot tests passed for commit d99a2b3 vs. |
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.
Do we not have documentation about the format of this event in the README right now? That might actually help for this change, but we should also probably add it... (See e.g. Dialog's Events section)
All 621 screenshot tests passed for commit 9dea6a5 vs. |
…nents/material-components-web into fix/list/notifyAction-api
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.
Also update the notifyAction test in mdc-list.test.js? (It seems we aren't strenuously testing the event detail, but we're also passing a number to it.)
All 621 screenshot tests passed for commit 9a29392 vs. |
Updated unit test to |
All 621 screenshot tests passed for commit 6152bf8 vs. |
This fixes a regression caused by PR #4356, and adds a unit test to catch future integration failures between list and menu events.
This fixes a regression caused by PR #4356, and adds a unit test to catch future integration failures between list and menu events.
Fixes #4355
BREAKING CHANGE: The default
MDCListAdapter.notifyAction()
implementation now emits an object of type{index: number}
rather than a primitivenumber
directly.