Methods
# inner SectionRow(props) → {React.ReactElement}
Component to render a row of fields inside a section
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
props |
object
|
props object | |
row |
object
|
the row object | |
row.fields |
array
|
the fields to render | |
row.solitary |
boolean
|
<optional> |
whether or not the row is a solitary field |
row.size |
number
|
<optional> |
the size of the solitary field |
row.maxColumns |
number
|
<optional> |
the max number of columns to render |
control |
object
|
the control object from useForm | |
options |
object
|
<optional> |
the options object |
options.fieldOptions |
object
|
<optional> |
the options to pass to the fields |
- the rendered row using Grid
React.ReactElement
Example
<CardContent>
{rows.map((rowItem, rIndex) => {
return (
<SectionRow row={rowItem} control={control} options={options} key={`${index}-row-${rIndex}`} />
);
})}
</CardContent>
Type Definitions
# renderColumnSection(section, control, index, optionsopt) → {React.ReactElement}
Renderer for a section with
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
section |
object
|
the section to render | |
fields |
array
|
the fields to render in the section | |
title |
string
|
<optional> |
the title of the section |
description |
string
|
<optional> |
the description of the section |
control |
object
|
the control object from react-hook-form | |
index |
number
|
the index of the section | |
options |
object
|
<optional> |
options object |
columnCount |
number
|
<optional> |
the number of columns to render |
renderSectionDescription |
renderSectionDescription
|
<optional> |
a function to render the section description |
renderSectionTitle |
renderSectionTitle
|
<optional> |
a function to render the section title |
renderSectionTop |
renderSectionTop
|
<optional> |
a function to render the section top |
hideEmptySections |
boolean
|
<optional> |
a flag to hide sections that are empty |
- the rendered column section
React.ReactElement
# renderSectionDescription(description, index) → {React.ReactElement}
Callback for rendering a section description
Parameters:
Name | Type | Description |
---|---|---|
description |
string
|
the description to render |
index |
number
|
the index of the section |
- the rendered description
React.ReactElement
# renderSectionTitle(title, index) → {React.ReactElement}
Callback for rendering a section title
Parameters:
Name | Type | Description |
---|---|---|
title |
string
|
the description to render |
index |
number
|
the index of the section |
- the rendered description
React.ReactElement
# renderSectionTop(section, index) → {React.ReactElement}
Callback for rendering a section title
Parameters:
Name | Type | Description |
---|---|---|
section |
object
|
the section properties (title, description, etc) |
index |
number
|
the index of the section |
- the rendered description
React.ReactElement