Skip to content

Provide defaults for TableColumnLayout if options aren't provided#3962

Merged
LFDanLu merged 2 commits into
mainfrom
table_column_layout_defaults
Jan 31, 2023
Merged

Provide defaults for TableColumnLayout if options aren't provided#3962
LFDanLu merged 2 commits into
mainfrom
table_column_layout_defaults

Conversation

@LFDanLu
Copy link
Copy Markdown
Member

@LFDanLu LFDanLu commented Jan 26, 2023

Closes

Found when writing the aria table resizing component, currently crashes when getDefaultWidth/getDefaultMinWidth aren't provided even though they are optional

✅ Pull Request Checklist:

  • Included link to corresponding React Spectrum GitHub Issue.
  • Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • Filled out test instructions.
  • Updated documentation (if it already exists for this component).
  • Looked at the Accessibility Practices for this feature - Aria Practices

📝 Test Instructions:

Sanity test resizing examples. Otherwise the test should cover the case where the user doesn't actually provide any options (specifically getDefaultWidth and getDefaultMinWidth) to TableColumnLayout via useTableColumnResizeState

🧢 Your Project:

RSP

@rspbot
Copy link
Copy Markdown

rspbot commented Jan 26, 2023

Copy link
Copy Markdown
Member

@reidbarber reidbarber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown
Member

@snowystinger snowystinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks right, covers both the hook and the TableLayout

@rspbot
Copy link
Copy Markdown

rspbot commented Jan 31, 2023

@rspbot
Copy link
Copy Markdown

rspbot commented Jan 31, 2023

## API Changes

unknown top level export { type: 'identifier', name: 'Column' }
unknown top level export { type: 'identifier', name: 'Column' }
unknown type { type: 'link' }
unknown type { type: 'link' }
unknown type { type: 'link' }
unknown type { type: 'link' }
unknown type { type: 'link' }
unknown type { type: 'link' }

@LFDanLu LFDanLu merged commit 8e57eae into main Jan 31, 2023
@LFDanLu LFDanLu deleted the table_column_layout_defaults branch January 31, 2023 01:28
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.

4 participants