update seed blend

This commit is contained in:
Jake Kasper
2025-09-03 11:44:14 -04:00
parent 1826bf2702
commit af302719be
7 changed files with 85 additions and 46 deletions

View File

@@ -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;