update seed blend
This commit is contained in:
@@ -1471,7 +1471,7 @@ const EditProductModal = ({ product, onSubmit, onCancel, sharedProducts, categor
|
||||
};
|
||||
|
||||
// Editor component for seed blends
|
||||
const SeedBlendEditor = ({ value = [], onChange }) => {
|
||||
function SeedBlendEditor({ value = [], onChange }) {
|
||||
const [rows, setRows] = React.useState(value || []);
|
||||
React.useEffect(()=>{ onChange && onChange(rows); }, [rows]);
|
||||
const addRow = () => setRows([...(rows||[]), { cultivar: '', percent: '' }]);
|
||||
@@ -1502,6 +1502,6 @@ const SeedBlendEditor = ({ value = [], onChange }) => {
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
export default Products;
|
||||
|
||||
Reference in New Issue
Block a user