@stoker-platform/web-app 0.5.152 → 0.5.153
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/package.json +1 -1
- package/src/Files.tsx +6 -3
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
package/src/Files.tsx
CHANGED
|
@@ -835,7 +835,7 @@ export const RecordFiles = ({ collection, record }: FilesProps) => {
|
|
|
835
835
|
const handleEditName = useCallback(
|
|
836
836
|
async (item: StorageItem, newName: string, options?: { skipReload?: boolean }) => {
|
|
837
837
|
if (!record) return
|
|
838
|
-
if (newName === item.name) {
|
|
838
|
+
if (newName === undefined || newName === null || newName === item.name) {
|
|
839
839
|
setEditingFile(null)
|
|
840
840
|
return
|
|
841
841
|
}
|
|
@@ -1066,7 +1066,10 @@ export const RecordFiles = ({ collection, record }: FilesProps) => {
|
|
|
1066
1066
|
|
|
1067
1067
|
const handleRenameAll = useCallback(async () => {
|
|
1068
1068
|
const filesToRename = items
|
|
1069
|
-
.filter((item) =>
|
|
1069
|
+
.filter((item) => {
|
|
1070
|
+
const newName = bulkRenameNames[item.name]
|
|
1071
|
+
return canEditFile(item) && newName !== undefined && newName !== item.name
|
|
1072
|
+
})
|
|
1070
1073
|
.map((item) => ({ item, newName: bulkRenameNames[item.name] }))
|
|
1071
1074
|
|
|
1072
1075
|
if (filesToRename.length === 0) {
|
|
@@ -1325,7 +1328,7 @@ export const RecordFiles = ({ collection, record }: FilesProps) => {
|
|
|
1325
1328
|
<Input
|
|
1326
1329
|
value={
|
|
1327
1330
|
bulkRenameMode
|
|
1328
|
-
? bulkRenameNames[item.name]
|
|
1331
|
+
? (bulkRenameNames[item.name] ?? item.name)
|
|
1329
1332
|
: newFileName
|
|
1330
1333
|
}
|
|
1331
1334
|
disabled={bulkRenameMode && bulkRenameInProgress}
|