Thought I'd take a stab at #113 too. In the process, I noticed a couple other things:
getSiblingNamesForResource returns the specified resource's name, in addition to those of its siblings, so users would get a "name already in use" error if they clicked Rename and then OK without making any changes. That felt weird to me, so I worked around it. Not sure if I did so in the best possible way (perhaps getSiblingNames... should be modified instead, but I was daunted by all the immutable.js stuff).
After renaming a file, the explorer's activeNode becomes undefined, so if you click the rename button again, nothing happens. I feel pretty confident that I fixed this in the Correct Way, but I'd welcome any corrections!
Thought I'd take a stab at #113 too. In the process, I noticed a couple other things:
getSiblingNamesForResource
returns the specified resource's name, in addition to those of its siblings, so users would get a "name already in use" error if they clicked Rename and then OK without making any changes. That felt weird to me, so I worked around it. Not sure if I did so in the best possible way (perhaps getSiblingNames... should be modified instead, but I was daunted by all the immutable.js stuff).activeNode
becomes undefined, so if you click the rename button again, nothing happens. I feel pretty confident that I fixed this in the Correct Way, but I'd welcome any corrections!