mirror of
https://github.com/reduxjs/redux-devtools.git
synced 2025-04-16 22:41:59 +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 });
|
||||
};
|
||||
|
||||
handleSubmit = ({ formData: template }: { formData: Template }) => {
|
||||
handleSubmit = ({ formData: template }: { formData?: Template }) => {
|
||||
const { templates = getDefaultTemplates(), selected = 0 } =
|
||||
this.getPersistedState();
|
||||
if (this.state.dialogStatus === 'Add') {
|
||||
this.updateState({
|
||||
selected: templates.length,
|
||||
templates: [...templates, template],
|
||||
templates: [...templates, template!],
|
||||
});
|
||||
} else {
|
||||
const editedTemplates = [...templates];
|
||||
editedTemplates[selected] = template;
|
||||
editedTemplates[selected] = template!;
|
||||
this.updateState({
|
||||
templates: editedTemplates,
|
||||
});
|
||||
|
|
|
@ -9,7 +9,7 @@ import customWidgets from './widgets';
|
|||
|
||||
const FormContainer = createStyledComponent(styles, JSONSchemaForm);
|
||||
|
||||
export interface Props<T> extends FormProps<T> {
|
||||
export interface Props<T> extends Omit<FormProps<T>, 'validator'> {
|
||||
children?: React.ReactNode;
|
||||
submitText?: string;
|
||||
primaryButton?: boolean;
|
||||
|
|
Loading…
Reference in New Issue
Block a user