Skip to main content
Version: Current (v7.0.0-beta.3)

A layout grid column takes its width as span

Detect​

  • ui:col entries in your uiSchema with a Bootstrap 3 class such as className: 'col-xs-4', or ui:row entries with className: 'row', rendered by @rjsf/core.
  • The rendered page: grid columns no longer take their widths.

Change​

The GridTemplate takes a column's width as a span prop ('ui:col': { span: 4 }) in place of a col-xs-4 class, and adds rjsf-grid-row and rjsf-grid-column itself:

'ui:row': {
- className: 'row',
children: [
- { 'ui:col': { className: 'col-xs-4', children: ['first'] } },
+ { 'ui:col': { span: 4, children: ['first'] } },
],
},

A layout grid that stays on Bootstrap 3 through @rjsf/bootstrap3 keeps its className: 'row' and className: 'col-xs-*' properties, see Bootstrap 3 moved.

Verify​

  • With @rjsf/core/rjsf.css loaded, each column takes the width its span gives.

Also read: