leva icon indicating copy to clipboard operation
leva copied to clipboard

Rename a folder

Open amirdeljouyi opened this issue 4 years ago • 2 comments

Hello, First of all, thanks for the library. Leva looks great. I am already using it on my project.

I have two questions about folders. First, how to rename a folder programmatically? Second, is it possible to use an icon for the folder's label or add a checkbox for each folder?

Thanks.

amirdeljouyi avatar Apr 30 '21 13:04 amirdeljouyi

Hi @amirdeljouyi, the only way to rename a folder programmatically at the moment is to use deps so that Leva rebuilds the schema when the deps change. Let me know if you need help with this. What's the usecase?

As for the second question, no, and no :( an icon would be fairly easy to add, but I'm curious as to what would be the checkbox usecase?

dbismut avatar Apr 30 '21 15:04 dbismut

Thanks for replying quickly. My usecase is like the picture below.

For the first question, I want to rename a folder when the text name was changed, and it would be amazing if the folder could be renamed by double-clicking on it. For the second question, I want to use a checkbox for visibility in the header of the folder like other software (ex. Photoshop).

Best.


My Usecase:

image


Photoshop Example:

image

amirdeljouyi avatar May 01 '21 16:05 amirdeljouyi