iloom-flatten/.microcompact/mpmjrpn3/functions.Edit:20.txt

19 lines
740 B
Plaintext
Raw Permalink Normal View History

The file /home/project/src/components/warehouse/ProductForm.tsx has been updated. Made 1 replacement.
Here's the result of running `cat -n` on a snippet of the edited file:
300→ yarn_ratios: prev.yarn_ratios.filter((_, i) => i !== index)
301→ }));
302→ };
303→
304→ const updateYarnRatio = (index: number, field: 'yarn_name' | 'ratio' | 'yarn_type', value: string | number) => {
305→ setFormData(prev => {
306→ const newRatios = [...prev.yarn_ratios];
307→ newRatios[index] = { ...newRatios[index], [field]: value };
308→ return { ...prev, yarn_ratios: newRatios };
309→ });
310→ };
311→
312→ if (!isOpen) return null;
313→
314→ return (
315→ <motion.div