-
-
Notifications
You must be signed in to change notification settings - Fork 32
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: rename file #102
feat: rename file #102
Conversation
let newData = cloneDeep(files); | ||
newData = newData.map((item) => | ||
item.id === fileId ? { ...item, data: { ...item.data, name: newName } } : item | ||
); | ||
return { files: newData }; |
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.
what is the reason of deep clone here? right below you are essentially recreating the whole thing anyway 🤔
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.
I reworked this totally, review again, please.
templates/frontend/src/components/shared/file-browser/folder/folder.jsx
Outdated
Show resolved
Hide resolved
@lxkuz thanks for contribution! Made some nitpicks, otherwise LGTM! GJ 👏 |
Describe what changes this pull request brings
Covering #92 we add a dropdown to the file with
Delete
andRename
options.Describe any additional changes
Rename modal is generalized and now supports both file and folder.
Steps to test
Screenshots
Checklist
TODO
References
Issue #92