File tree 3 files changed +8
-5
lines changed
ra-ui-materialui/src/form
3 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -190,7 +190,7 @@ export type FormWithRedirectProps = FormWithRedirectOwnProps &
190
190
191
191
export type FormWithRedirectRenderProps = Omit <
192
192
FormViewProps ,
193
- 'chilren ' | 'render' | 'setRedirect'
193
+ 'children ' | 'render' | 'setRedirect'
194
194
> ;
195
195
export type FormWithRedirectRender = (
196
196
props : FormWithRedirectRenderProps
Original file line number Diff line number Diff line change 1
1
import * as React from 'react' ;
2
- import { Children , FC , ReactElement } from 'react' ;
2
+ import { Children , ReactElement , ReactNode } from 'react' ;
3
3
import classnames from 'classnames' ;
4
4
import FormInput from './FormInput' ;
5
5
import PropTypes from 'prop-types' ;
6
6
import { FormWithRedirectRenderProps , MutationMode , Record } from 'ra-core' ;
7
7
import Toolbar from './Toolbar' ;
8
8
import CardContentInner from '../layout/CardContentInner' ;
9
9
10
- export const SimpleFormView : FC < SimpleFormViewProps > = ( {
10
+ export const SimpleFormView = ( {
11
11
basePath,
12
12
children,
13
13
className,
@@ -27,7 +27,7 @@ export const SimpleFormView: FC<SimpleFormViewProps> = ({
27
27
undoable,
28
28
variant,
29
29
...rest
30
- } ) => (
30
+ } : SimpleFormViewProps ) : ReactElement => (
31
31
< form
32
32
className = { classnames ( 'simple-form' , className ) }
33
33
{ ...sanitizeRestProps ( rest ) }
@@ -98,6 +98,7 @@ SimpleFormView.defaultProps = {
98
98
99
99
export interface SimpleFormViewProps extends FormWithRedirectRenderProps {
100
100
basePath ?: string ;
101
+ children ?: ReactNode ;
101
102
className ?: string ;
102
103
component ?: React . ComponentType < any > ;
103
104
margin ?: 'none' | 'normal' | 'dense' ;
Original file line number Diff line number Diff line change 5
5
cloneElement ,
6
6
isValidElement ,
7
7
ReactElement ,
8
+ ReactNode ,
8
9
useState ,
9
10
} from 'react' ;
10
11
import PropTypes from 'prop-types' ;
@@ -22,7 +23,7 @@ import Toolbar from './Toolbar';
22
23
import TabbedFormTabs , { getTabFullPath } from './TabbedFormTabs' ;
23
24
import { ClassesOverride } from '../types' ;
24
25
25
- export const TabbedFormView = ( props : TabbedFormViewProps ) => {
26
+ export const TabbedFormView = ( props : TabbedFormViewProps ) : ReactElement => {
26
27
const {
27
28
basePath,
28
29
children,
@@ -183,6 +184,7 @@ TabbedFormView.defaultProps = {
183
184
184
185
export interface TabbedFormViewProps extends FormWithRedirectRenderProps {
185
186
basePath ?: string ;
187
+ children ?: ReactNode ;
186
188
classes ?: ClassesOverride < typeof useTabbedFormViewStyles > ;
187
189
className ?: string ;
188
190
margin ?: 'none' | 'normal' | 'dense' ;
You can’t perform that action at this time.
0 commit comments