Skip to content

Commit 23c3fb9

Browse files
committed
Add documentation for quotePath prop and re-quoting logic
1 parent ebb9600 commit 23c3fb9

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

ui/v2.5/src/components/Shared/FolderSelect/FolderSelect.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ interface IProps {
1515
defaultDirectories?: string[];
1616
appendButton?: JSX.Element;
1717
collapsible?: boolean;
18+
/** Re-wrap stripped path in quotes if it contains spaces (needed by PathFilter) */
1819
quotePath?: boolean;
1920
hideError?: boolean;
2021
}
@@ -50,6 +51,7 @@ const _FolderSelect: React.FC<IProps> = ({
5051

5152
function setInstant(value: string) {
5253
const stripped = TextUtils.stripQuotes(value);
54+
// re-quote if backend expects it (PathFilter); otherwise keep stripped
5355
const normalizedValue =
5456
quotePath && stripped.includes(" ")
5557
? TextUtils.addQuotes(stripped)

0 commit comments

Comments
 (0)