-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(dropdown, dropdown-item-group, dropdown-item): `getElementPr…
…op` is refactored out in favor of inheritable props set directly on parent (#7582) **Related Issue:** #6038 ## Summary `getElementProp` is refactored out across child components as an outdated pattern in favor of inheritable props set directly on the parent. The logic for setting these props thus moves to the parent, getting rid of the `getElementProp` altogether. The parent component gets a `mutationObserver` to do this as well as `watchers` for when it needs to modify the children. Inherited props addressed: - [x] `scale` is inherited from `dropdown`, - [x] `selectionMode` is inherited from `dropdown-item-group`, so there can be a mix of types within one dropdown.
- Loading branch information
Showing
7 changed files
with
1,139 additions
and
1,066 deletions.
There are no files selected for viewing
20 changes: 19 additions & 1 deletion
20
packages/calcite-components/src/components/dropdown-group/dropdown-group.e2e.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 0 additions & 5 deletions
5
packages/calcite-components/src/components/dropdown-group/resources.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 1 addition & 3 deletions
4
packages/calcite-components/src/components/dropdown-item/resources.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.