TagGroup: add maxRows prop to limit initially shown tags, and include 'Show all' button#3759
Conversation
|
Build successful! 🎉 |
defaultVisibleRows prop to limit initially shown tags, and include 'Show all' buttonmaxRows prop to limit initially shown tags, and include 'Show all' button
|
Build successful! 🎉 |
|
Build successful! 🎉 |
|
Build successful! 🎉 |
|
Build successful! 🎉 |
maxRows prop to limit initially shown tags, and include 'Show all' buttonmaxRows prop to limit initially shown tags, and include 'Show all' button
|
Build successful! 🎉 |
|
Build successful! 🎉 |
snowystinger
left a comment
There was a problem hiding this comment.
We need a FocusScope around the TagGroup. See https://github.com/adobe/react-spectrum/blob/main/packages/%40react-spectrum/actiongroup/src/ActionGroup.tsx#L219 for an example
|
Seems like when you make the width bigger, it doesn't display more tags now? |
@devongovett If you refresh, it behaves correctly. Looking into why it's different on first load.... |
|
@devongovett Yeah, looks like the new inline styles I introduced broke the overflow logic. Working on it now. |
|
Build successful! 🎉 |
|
Should be fixed now. One issue was with font loading, and I needed to set the resize observer to watch the new container. Also went ahead and added in translation strings for the button. |
devongovett
left a comment
There was a problem hiding this comment.
Working well for me in Safari.
|
Build successful! 🎉 |
1 similar comment
|
Build successful! 🎉 |
|
Build successful! 🎉 |
|
## API Changes
unknown top level export { type: 'identifier', name: 'Column' } @react-aria/tagAriaTagGroupProps-
+AriaTagGroupProps<T> {
+ keyboardDelegate?: TagKeyboardDelegate<T>
+}it changed:
@react-spectrum/tagItem SpectrumTagGroupProps<T> {
- allowsRemoving?: boolean
- onRemove?: (Key) => void
+
}SpectrumTagGroupProps+TagGroup<T extends {}> {
+} |
snowystinger
left a comment
There was a problem hiding this comment.
Working well for me in Chrome and on iPhone Safari

Closes #3660
✅ Pull Request Checklist:
📝 Test Instructions:
Check maxRows stories under TagGroup. Resize container and confirm behavior.
🧢 Your Project:
RSP