-
Notifications
You must be signed in to change notification settings - Fork 1.3k
feat: table "inline" editing #8754
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Build successful! 🎉 |
Build successful! 🎉 |
…nvalid state, click off
Build successful! 🎉 |
Build successful! 🎉 |
Build successful! 🎉 |
Build successful! 🎉 |
Build successful! 🎉 |
Build successful! 🎉 |
Build successful! 🎉 |
let boundaryStartEdge = boundaryDimensions.scroll[AXIS[axis]] + padding; | ||
let boundaryEndEdge = boundarySize + boundaryDimensions.scroll[AXIS[axis]] - padding; | ||
let startEdgeOffset = offset - containerScroll + containerOffsetWithBoundary[axis] - boundaryDimensions[AXIS[axis]]; | ||
let startEdgeOffset = offset - containerScroll + containerOffsetWithBoundary[axis]; |
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.
ignore this change for a bit, might be a bug in our positioning code
…plementation to make generic, fix density, individual cell saving state, use touch detection for showing all the time
**/ | ||
onAction?: () => void | ||
onAction?: () => void, | ||
focusMode?: 'cell' | 'child' |
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.
change we'd need to make if we want to support edit mode on some cells vs others
Build successful! 🎉 |
context={TextContext} | ||
value={{ | ||
slots: { | ||
[DEFAULT_SLOT]: {styles: label({size})}, |
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.
this is just a missing feature we should really have in S2
Build successful! 🎉 |
Build successful! 🎉 |
Build successful! 🎉 |
Build successful! 🎉 |
Build successful! 🎉 |
Build successful! 🎉 |
# Conflicts: # packages/@react-spectrum/s2/src/ActionButton.tsx # packages/@react-spectrum/s2/stories/TableView.stories.tsx # packages/react-aria-components/src/Button.tsx # packages/react-aria-components/test/Button.test.js
Build successful! 🎉 |
Build successful! 🎉 |
Build successful! 🎉 |
Build successful! 🎉 |
Build successful! 🎉 |
## API Changes
@react-spectrum/s2/@react-spectrum/s2:EditableCell+EditableCell {
+ align?: 'start' | 'center' | 'end' = 'start'
+ children: ReactNode
+ className?: ClassNameOrFunction<CellRenderProps>
+ colSpan?: number
+ id?: Key
+ isSaving?: boolean
+ onCancel: () => void
+ onSubmit: () => void
+ renderEditing: () => ReactNode
+ showDivider?: boolean
+ style?: StyleOrFunction<CellRenderProps>
+ textValue?: string
+} |
Closes RSP Component Milestones (view)
Implements our Editable Cell component for Table's. Note, this is called inline editing by Spectrum at the moment, but it does not correlate to aria inline editing.
This essentially works around the issue of textfields in cells or anything else in cells.
Will be adding more tests
✅ Pull Request Checklist:
📝 Test Instructions:
🧢 Your Project: