(key: string, value: any)
| 36 | }, [catId, wUnit]); |
| 37 | |
| 38 | function update(key: string, value: any) { |
| 39 | const i = Object.assign({}, { ...copy, [key]: value }); |
| 40 | setCopy(i); |
| 41 | } |
| 42 | |
| 43 | function handleSave() { |
| 44 | if (!copy.name || isEqual(copy, item)) return; |