fix: Files field fix (#7376)
## Description Closes #7324 Closes #7323 - This PR solves the issue - - #7324 - #7323 - On Enter the rename of the file is saved - Removed renaming of extension ## After Changes Behaviour https://github.com/user-attachments/assets/f5c47cd4-883e-473e-9cfa-e277f8f630c2 --------- Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
This commit is contained in:
@ -0,0 +1,8 @@
|
||||
export const getFileNameAndExtension = (filenameWithExtension: string) => {
|
||||
const lastDotIndex = filenameWithExtension.lastIndexOf('.');
|
||||
|
||||
return {
|
||||
name: filenameWithExtension.substring(0, lastDotIndex),
|
||||
extension: filenameWithExtension.substring(lastDotIndex),
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user