-
Notifications
You must be signed in to change notification settings - Fork 147
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
feat(dam-app-base): replace react-searchable-hoc with dndkit #7431
feat(dam-app-base): replace react-searchable-hoc with dndkit #7431
Conversation
✅ Deploy Preview for ecommerce-app-base-components canceled.
|
34ee30a
to
27e6221
Compare
@@ -121,164 +128,206 @@ const AdditionalDataDisplay = ({ additionalData }: AdditionalDataDisplayProps) = | |||
); | |||
}; | |||
|
|||
const DragHandle = SortableHandle<DragHandleProps>( |
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 component stayed the same, other than removing the SortableHandle<DragHandleProps>
wrapper that was exposed by react-sortable-hoc
.
60c6cf7
to
b58aa46
Compare
|
||
const SortableItem = SortableElement<SortableElementProps>((props: SortableElementProps) => { |
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.
the SortableItem
component also stays much the same. Just swapping out react-sortable-hoc
's SortableElement
wrapper for dndkit
's useSortable()
hook. And passing the response to <Card>
|
||
export class SortableComponent extends React.Component<Props> { |
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.
Merge SortableComponent
and SortableList
into one component.
b58aa46
to
57baf88
Compare
Purpose
Migrate
react-sortable-hoc
todndkit
, sincereact-sortable-hoc
is no longer supported, and is not compatible with versions of react higher than v16.This will unblock us from upgrading to react v18.
Approach
Swap out
react-sortable-hoc
wrappers for newer styledndkit
hooks.Screenshots