EnCiv/undebate-ssp

election-table-input-component

ddfridley opened this issue · 1 comments

<CandidateTableInput
        classname={}
        style={}
        defaultValue={[]}
        onDone={(valid,value)=>{})
        editable={}
>

editable false means the table is not editable.
defaultValue is an array of row objects
Render a table and allow the user to input entries.
When entries change, onDone is called with the row object as the values to update them.
candidates may change at anytime from the server side - need to rerender'

use react-table to do the table, and see https://react-table.tanstack.com/docs/examples/editable-data for making one that's editable

figma: https://www.figma.com/file/yXrcMvg5EIwdLkHHxIdILh/Undebate-Self-Service-Portal?node-id=388%3A5830
image

Closed by PR #89