Skip to content

Commit b34d993

Browse files
authored
fix: Select cannot paste string (#495)
close ant-design/ant-design#24461
1 parent 8d8816d commit b34d993

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Selector/index.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,10 @@ const Selector: React.RefForwardingComponent<RefSelectorProps, SelectorProps> =
159159
};
160160

161161
const onInputPaste: React.ClipboardEventHandler = e => {
162+
// github.com/ant-design/ant-design/issues/24461
163+
if ((e.target as HTMLInputElement).value) {
164+
return;
165+
}
162166
const { clipboardData } = e;
163167
const value = clipboardData.getData('text');
164168

0 commit comments

Comments
 (0)