mirror of
https://github.com/sasjs/server.git
synced 2026-01-06 14:10:06 +00:00
feat: implemented delete file/folder functionality
This commit is contained in:
@@ -56,6 +56,12 @@ const Studio = () => {
|
||||
) => {
|
||||
if (node.relativePath === path) {
|
||||
removeNodeFromParent(parentNode, path)
|
||||
// reset selected file path and file path query param
|
||||
if (
|
||||
node.relativePath === selectedFilePath ||
|
||||
selectedFilePath.startsWith(node.relativePath)
|
||||
)
|
||||
setSearchParams({})
|
||||
return true
|
||||
}
|
||||
if (Array.isArray(node.children)) {
|
||||
@@ -81,6 +87,7 @@ const Studio = () => {
|
||||
selectedFilePath={selectedFilePath}
|
||||
directoryData={directoryData}
|
||||
handleSelect={handleSelect}
|
||||
removeFileFromTree={removeFileFromTree}
|
||||
/>
|
||||
<SASjsEditor
|
||||
selectedFilePath={selectedFilePath}
|
||||
|
||||
Reference in New Issue
Block a user