mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-08 16:59:50 +03:00
Merge remote-tracking branch 'origin/v3.4' into dev
This commit is contained in:
8
interface/src/utils/submit.ts
Normal file
8
interface/src/utils/submit.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
export const onEnterCallback =
|
||||
(callback: () => void): ((event: React.KeyboardEvent) => void) =>
|
||||
(event: React.KeyboardEvent) => {
|
||||
if (event.key === 'Enter') {
|
||||
callback();
|
||||
event.preventDefault();
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user