@@ -36,7 +36,7 @@ export default (props: any) => {
3636 const configCtx = useContext ( ConfigContext ) ;
3737
3838 const { form, widgets, methods, globalProps } : any = configCtx ;
39- const { hidden, properties, dependencies, inlineMode : _inlineMode , remove, removeText, visible = true , ...otherSchema } = schema ;
39+ const { hidden, properties, dependencies, inlineMode : _inlineMode , remove, removeText, visible = true , layout , ...otherSchema } = schema ;
4040 const getValueFromKey = getParamValue ( formCtx , upperCtx , schema ) ;
4141
4242 useEffect ( ( ) => {
@@ -105,6 +105,7 @@ export default (props: any) => {
105105
106106 const extra = getExtraView ( 'extra' , schema , widgets ) ;
107107 const help = getExtraView ( 'help' , schema , widgets ) ;
108+ const tooltip = getExtraView ( 'tooltip' , schema , widgets ) ;
108109 const ruleList = getRuleList ( schema , form , methods ) ;
109110 const readOnly = getValueFromKey ( 'readOnly' ) ;
110111 const valuePropName = schema . valuePropName || valuePropNameMap [ schema . widget ] || undefined ;
@@ -113,10 +114,6 @@ export default (props: any) => {
113114 fieldProps . readOnly = readOnly ;
114115 }
115116
116- if ( ! label ) {
117- noStyle = true ;
118- }
119-
120117 if ( readOnly ) {
121118 Widget = getWidget ( widgets , schema . readOnlyWidget , schema , true ) ;
122119 }
@@ -128,7 +125,7 @@ export default (props: any) => {
128125 valuePropName,
129126 hidden,
130127 extra,
131- help,
128+ help : tooltip || help ,
132129 noStyle,
133130 dependencies,
134131 name : path ,
@@ -137,6 +134,13 @@ export default (props: any) => {
137134 className :classnames ( 'fr-field' , { 'fr-field-visibility' : ! visible } )
138135 } ;
139136
137+ if ( layout ) {
138+ itemProps . layout = {
139+ column : 'vertical' ,
140+ row : 'horizontal' ,
141+ } [ layout ] ;
142+ }
143+
140144 if ( ! readOnly && needOnClick ) {
141145 itemProps . onClick = ( ) => {
142146 fieldRef . current . open ( ) ;
0 commit comments