Skip to content

Commit a0e0e0c

Browse files
committed
Fix usage with Dialog
1 parent 0470c2b commit a0e0e0c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/ra-ui-materialui/src/input/AutocompleteInput.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -554,6 +554,8 @@ If you provided a React element for the optionText prop, you must also provide t
554554

555555
const handleAutocompleteChange = useCallback(
556556
(event: any, newValue: any, reason: AutocompleteChangeReason) => {
557+
event.stopPropagation();
558+
event.preventDefault();
557559
if (reason === 'createOption') {
558560
// When users press the enter key after typing a new value, we can handle it as if they clicked on the create option
559561
handleChangeWithCreateSupport(getCreateItem(newValue));

0 commit comments

Comments
 (0)