@etsoo/materialui 1.6.25 → 1.6.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, { SubmitEventHandler } from "react";
|
|
2
2
|
import { CommonPageProps } from "./CommonPage";
|
|
3
3
|
import type { OperationMessageHandlerAll } from "../messages/OperationMessageHandler";
|
|
4
4
|
/**
|
|
@@ -12,7 +12,7 @@ export interface EditPageProps extends Omit<CommonPageProps, "onSubmit"> {
|
|
|
12
12
|
/**
|
|
13
13
|
* On form submit
|
|
14
14
|
*/
|
|
15
|
-
onSubmit?:
|
|
15
|
+
onSubmit?: SubmitEventHandler<HTMLFormElement>;
|
|
16
16
|
/**
|
|
17
17
|
* On delete callback
|
|
18
18
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, { SubmitEventHandler } from "react";
|
|
2
2
|
import { CommonPageProps } from "./CommonPage";
|
|
3
3
|
import type { OperationMessageHandlerAll } from "../messages/OperationMessageHandler";
|
|
4
4
|
/**
|
|
@@ -12,7 +12,7 @@ export interface EditPageProps extends Omit<CommonPageProps, "onSubmit"> {
|
|
|
12
12
|
/**
|
|
13
13
|
* On form submit
|
|
14
14
|
*/
|
|
15
|
-
onSubmit?:
|
|
15
|
+
onSubmit?: SubmitEventHandler<HTMLFormElement>;
|
|
16
16
|
/**
|
|
17
17
|
* On delete callback
|
|
18
18
|
*/
|
package/package.json
CHANGED
package/src/SearchBar.tsx
CHANGED
|
@@ -100,7 +100,7 @@ const setChildState = (child: Element, enabled: boolean) => {
|
|
|
100
100
|
}
|
|
101
101
|
};
|
|
102
102
|
|
|
103
|
-
function checkFormEvent(event: React.
|
|
103
|
+
function checkFormEvent(event: React.ChangeEvent<HTMLFormElement>) {
|
|
104
104
|
if (event.nativeEvent.cancelable && !event.nativeEvent.composed) return true;
|
|
105
105
|
|
|
106
106
|
if (
|
|
@@ -291,7 +291,7 @@ export function SearchBar(props: SearchBarProps) {
|
|
|
291
291
|
const hasMoreItems = moreItems.length > 0;
|
|
292
292
|
|
|
293
293
|
// Handle main form
|
|
294
|
-
const handleForm = (event: React.
|
|
294
|
+
const handleForm = (event: React.ChangeEvent<HTMLFormElement>) => {
|
|
295
295
|
if (checkFormEvent(event)) return;
|
|
296
296
|
|
|
297
297
|
if (state.form == null) state.form = event.currentTarget;
|
|
@@ -305,7 +305,7 @@ export function SearchBar(props: SearchBarProps) {
|
|
|
305
305
|
};
|
|
306
306
|
|
|
307
307
|
// More form change
|
|
308
|
-
const moreFormChange = (event: React.
|
|
308
|
+
const moreFormChange = (event: React.ChangeEvent<HTMLFormElement>) => {
|
|
309
309
|
if (checkFormEvent(event)) return;
|
|
310
310
|
|
|
311
311
|
if (state.moreForm == null) state.moreForm = event.currentTarget;
|
package/src/pages/EditPage.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, { SubmitEventHandler } from "react";
|
|
2
2
|
import { MUGlobal } from "../MUGlobal";
|
|
3
3
|
import { CommonPage, CommonPageProps } from "./CommonPage";
|
|
4
4
|
import SaveIcon from "@mui/icons-material/Save";
|
|
@@ -22,7 +22,7 @@ export interface EditPageProps extends Omit<CommonPageProps, "onSubmit"> {
|
|
|
22
22
|
/**
|
|
23
23
|
* On form submit
|
|
24
24
|
*/
|
|
25
|
-
onSubmit?:
|
|
25
|
+
onSubmit?: SubmitEventHandler<HTMLFormElement>;
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* On delete callback
|