Skip to content
This repository has been archived by the owner on Nov 22, 2022. It is now read-only.

Commit

Permalink
Define default item for loop grid
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixHenninger committed Aug 18, 2020
1 parent 3c851e8 commit b44fe33
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,14 @@ const Row = ({ index: rowIndex, name, data, arrayHelpers }) =>
export default () => {
const { values } = useFormikContext()
const { templateParameters } = values
const columns = templateParameters.columns.length

return <Table
name="templateParameters.rows"
row={ Row }
columns={ templateParameters.columns.length }
columns={ columns }
header={ Header }
defaultItem={ Array(columns).fill('') }
className="border-top-0"
/>
}

0 comments on commit b44fe33

Please sign in to comment.