mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2025-07-04 20:03:19 +03:00
Update
This commit is contained in:
parent
6bed513a9b
commit
5297b47831
|
@ -64,17 +64,17 @@ export class TestTab<S, A extends Action<string>> extends Component<
|
||||||
this.setState({ dialogStatus: null });
|
this.setState({ dialogStatus: null });
|
||||||
};
|
};
|
||||||
|
|
||||||
handleSubmit = ({ formData: template }: { formData: Template }) => {
|
handleSubmit = ({ formData: template }: { formData?: Template }) => {
|
||||||
const { templates = getDefaultTemplates(), selected = 0 } =
|
const { templates = getDefaultTemplates(), selected = 0 } =
|
||||||
this.getPersistedState();
|
this.getPersistedState();
|
||||||
if (this.state.dialogStatus === 'Add') {
|
if (this.state.dialogStatus === 'Add') {
|
||||||
this.updateState({
|
this.updateState({
|
||||||
selected: templates.length,
|
selected: templates.length,
|
||||||
templates: [...templates, template],
|
templates: [...templates, template!],
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
const editedTemplates = [...templates];
|
const editedTemplates = [...templates];
|
||||||
editedTemplates[selected] = template;
|
editedTemplates[selected] = template!;
|
||||||
this.updateState({
|
this.updateState({
|
||||||
templates: editedTemplates,
|
templates: editedTemplates,
|
||||||
});
|
});
|
||||||
|
|
|
@ -9,7 +9,7 @@ import customWidgets from './widgets';
|
||||||
|
|
||||||
const FormContainer = createStyledComponent(styles, JSONSchemaForm);
|
const FormContainer = createStyledComponent(styles, JSONSchemaForm);
|
||||||
|
|
||||||
export interface Props<T> extends FormProps<T> {
|
export interface Props<T> extends Omit<FormProps<T>, 'validator'> {
|
||||||
children?: React.ReactNode;
|
children?: React.ReactNode;
|
||||||
submitText?: string;
|
submitText?: string;
|
||||||
primaryButton?: boolean;
|
primaryButton?: boolean;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user