Skip to content

Support for wrappers around collection nodes#258

Merged
dannify merged 7 commits intomasterfrom
collection-wrappers
Mar 10, 2020
Merged

Support for wrappers around collection nodes#258
dannify merged 7 commits intomasterfrom
collection-wrappers

Conversation

@devongovett
Copy link
Copy Markdown
Member

@devongovett devongovett commented Mar 7, 2020

This adds support for wrapper elements like <DialogTrigger> to be used around <Item> elements inside CollectionBuilder. This is done by supporting a getCollectionNode method on components, which returns the child element and the wrapper to be added back later during rendering.

CollectionBuilder has been refactored so that <Item> and <Section> use this same method, rather than doing hard coded checks for specific element types. They each return partial node objects, which are recursively built into their final full nodes. This will make adding additional elements like <Cell> and <SelectionGroup> much easier and more modular.

@devongovett devongovett marked this pull request as ready for review March 9, 2020 23:14
@devongovett devongovett changed the title [WIP] Support for wrappers around collection nodes Support for wrappers around collection nodes Mar 9, 2020
…ection-wrappers

# Conflicts:
#	packages/@react-stately/collections/src/types.ts
@adobe-bot
Copy link
Copy Markdown

Build successful! 🎉

@adobe-bot
Copy link
Copy Markdown

Build successful! 🎉

@dannify dannify merged commit b799ba8 into master Mar 10, 2020
@dannify dannify deleted the collection-wrappers branch March 10, 2020 18:26
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.

3 participants