-
Notifications
You must be signed in to change notification settings - Fork 42
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
How to rename file when adding new file. #71
Comments
ooooops seems we don't have a way to do that, sorry about it, but seems like a great FR for the next version |
Is there any way I can do it for example overriding something? |
one hack way is to fork and change this line https://github.com/shunjizhan/react-folder-tree/blob/master/src/components/EditableName/EditableName.jsx#L56 |
something like { name === DEFAULT_NAME ? 'new page' : name } |
Thanks so much. |
hello, The same thing happens to me, if I update the data property with a state like you do, specifically when I add a folder, it gets into an infinite loop because every time I update as you do with "setTreeState" it re-identifies the event " addNode" and repeat the cycle. Did you know how to fix it? Thank you. Ernesto |
I fixed it using a new state `
` |
I want to change the default name when creating a new file. For example "new page" I want to use for new functionality. Thanks very much
The text was updated successfully, but these errors were encountered: