-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
AAU I want to re-order my views with drag & drop #5002
Conversation
Co-authored-by: v1b3m <[email protected]> Co-authored-by: Matheus <[email protected]> Co-authored-by: FellipeMTX <[email protected]>
@gitstart-twenty The INDEX view (the one with the lock) should not be draggable, it should always stay at the bottom of the list: |
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.
Looks good from a code perspective, I have left some comments, thank you!
[updateView, viewsOnCurrentObject], | ||
); | ||
|
||
const getSortedViews = () => { |
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.
we should not recode this logic. It's already in: getObjectMetadataItemViews function
key={view.id} | ||
draggableId={view.id} | ||
index={index} | ||
isDragDisabled={viewsOnCurrentObject.length === 1} |
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.
if it's the INDEX view too
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.
Hey @charlesBochet
This has been updated!
Co-authored-by: v1b3m <[email protected]> Co-authored-by: Matheus <[email protected]> Co-authored-by: FellipeMTX <[email protected]>
LGTM! Thank you! |
### Description I want to re-order my views with drag & drop ### Refs twentyhq#4782 ### Demo https://jam.dev/c/699ece8a-0467-494a-b9a3-faf666ee9c93 Fixes twentyhq#4782 --------- Co-authored-by: gitstart-twenty <[email protected]> Co-authored-by: v1b3m <[email protected]> Co-authored-by: Matheus <[email protected]> Co-authored-by: FellipeMTX <[email protected]> Co-authored-by: Félix Malfait <[email protected]>
Description
I want to re-order my views with drag & drop
Refs
#4782
Demo
https://jam.dev/c/699ece8a-0467-494a-b9a3-faf666ee9c93
Fixes #4782