(raw: string)
| 77 | })(); |
| 78 | |
| 79 | const handleInput = (raw: string) => { |
| 80 | let changedVal = raw; |
| 81 | if (changedVal.endsWith(" /")) { |
| 82 | changedVal = changedVal.slice(0, -2); |
| 83 | } |
| 84 | if (changedVal.endsWith(".")) { |
| 85 | changedVal = changedVal.slice(0, -1); |
| 86 | } |
| 87 | const rawPath = changedVal |
| 88 | .split("/") |
| 89 | .map((p) => p.trim()) |
| 90 | .join("/"); |
| 91 | setFolderPath(rawPath); |
| 92 | }; |
| 93 | |
| 94 | // User explicitly clicked a row. Set the folder and close the popover. |
| 95 | const handleUserClick = (id: string) => { |