mirror of
https://github.com/tiqi-group/pydase.git
synced 2026-01-21 19:32:24 +01:00
prevents Enter key within StringComponent to submit form in MethodComponent
This commit is contained in:
@@ -64,6 +64,7 @@ export const StringComponent = React.memo((props: StringComponentProps) => {
|
|||||||
const handleKeyDown = (event) => {
|
const handleKeyDown = (event) => {
|
||||||
if (event.key === 'Enter' && !isInstantUpdate) {
|
if (event.key === 'Enter' && !isInstantUpdate) {
|
||||||
changeCallback(inputString);
|
changeCallback(inputString);
|
||||||
|
event.preventDefault();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user