Open tshemsedinov opened 2 years ago
Hello! The solution here is to make deep objects or has another approach?
We can implement it adding proxies. sheet.cells['item1'] -> Proxy instance with hook to read property item1.price
@Eternal-Rise
@tshemsedinov , what if we "override" some value?
const sheet = new Sheet();
sheet.cells['item1.price'] = 100;
sheet.cells['item2.price'] = 200;
sheet.cells['item3.price'] = 300;
sheet.cells['total'] = '=item1.price + item2.price + item3.price';
test.strictSame(sheet.values['total'], 600);
sheet.cells['item3'] = 42';
test.strictSame(sheet.values['total'], 600); // what we expect here?
Anyway, I want to help with it
Here is a case to be supported
Now it result: