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

Commit

Permalink
Enable loop grid import/export
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixHenninger committed Aug 18, 2020
1 parent 45b60cb commit 4a6ce63
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ export default ({ addItem, columns }) => {
const [dropdownOpen, setDropdownOpen] = useState(false)
//const factorialModal = createRef()
const { dispatch, overwriteAll } = useArrayContext()
const data = []

return (
<tfoot>
Expand Down Expand Up @@ -155,7 +154,11 @@ export default ({ addItem, columns }) => {
</div>
</Uploader>
<DropdownItem
onClick={ () => exportGrid(data, columns) }
onClick={ () => dispatch((rows, columns) => {
exportGrid(rows, columns)
// TODO: Can we do without rewriting the data?
return [rows, columns]
}) }
>
Export
</DropdownItem>
Expand Down

0 comments on commit 4a6ce63

Please sign in to comment.