I have a quantity cell which contains an input. When a user inputs a value there i want that value accessbible to other cells. Right now im simply recieving an empty value in gross profit because its an optional type. Strange if tanstack doesn’t offer any functionalies for this.
{
accessorKey: "quantity",
header: "Quantity",
cell: ({ cell, row }) => {
const {} = cell.getContext();
return (
<div>
<Input
value={row.original.quantity}
suffix="items"
type="number"
className="w-[120px]"
/>
</div>
);
},
},
{
accessorKey: "gross profit",
header: "Gross profit",
accessorFn: (row) => {
return row.quantity;
},
},
Gone through the docs but can’t find any solutions here. State management doesnt work either because the accessorKey takes the value from the type.
Henrik Syvaldsen is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.