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

Commit 4a6ce63

Browse files
Enable loop grid import/export
1 parent 45b60cb commit 4a6ce63

File tree

1 file changed

+5
-2
lines changed
  • packages/builder/src/components/ComponentOptions/components/Content/Loop/Grid

1 file changed

+5
-2
lines changed

packages/builder/src/components/ComponentOptions/components/Content/Loop/Grid/footer.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ export default ({ addItem, columns }) => {
3131
const [dropdownOpen, setDropdownOpen] = useState(false)
3232
//const factorialModal = createRef()
3333
const { dispatch, overwriteAll } = useArrayContext()
34-
const data = []
3534

3635
return (
3736
<tfoot>
@@ -155,7 +154,11 @@ export default ({ addItem, columns }) => {
155154
</div>
156155
</Uploader>
157156
<DropdownItem
158-
onClick={ () => exportGrid(data, columns) }
157+
onClick={ () => dispatch((rows, columns) => {
158+
exportGrid(rows, columns)
159+
// TODO: Can we do without rewriting the data?
160+
return [rows, columns]
161+
}) }
159162
>
160163
Export
161164
</DropdownItem>

0 commit comments

Comments
 (0)