Skip to content

Commit 7c2c2e0

Browse files
author
WB01676250
committed
fix: cascader
1 parent a55564b commit 7c2c2e0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/OptionList/Column.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,10 @@ export default function Column<OptionType extends DefaultOptionType = DefaultOpt
101101
);
102102

103103
React.useEffect(() => {
104-
const escapedValue = String(activeValue).replace(/"/g, '\\"');
104+
const escapedValue = String(activeValue)
105+
.replace(/\\/g, '\\\\')
106+
.replace(/"/g, '\\"');
107+
105108
const selector = `[data-path-key="${escapedValue}"]`;
106109
const activeElement = document.querySelector<HTMLElement>(selector);
107110

0 commit comments

Comments
 (0)