Tao Xin
Tao Xin
@all-contributors please add @OFurnell for bug
This seems like a tricky bug in VanX. Handling the `length` property of reactive arrays is always tricky. I am planning to get this bug fixed as soon as possible....
If you're using `vanX.list`, you should use [`vanX.replace`](https://vanjs.org/x#api-replace) instead of directly reassigning the value.
> When using vanX.replace, the original object is not changed (values from the array are not removed). I am not sure what you meant here. When using `vanX.replace`, the items...
> However, I noticed that deleter() creates empty cells rather than removing them from the array. This is intended behavior. By allowing "holes" in the array, we don't have to...
> I don’t understand well, but what is the logic in leaving empty cells in the array? To fill them or what to do with them? Leave empty until better...
> How to increase the precision of arr.length in van.derive? Currently length == 0 is not possible. > > https://jsfiddle.net/creatormir/cbaey9n3/ Hi @creatormir, FYI, [VanX 0.2.5](https://github.com/vanjs-org/van/commit/fc3ee4c4bdab9f0a065ff6d897c53f2fa8f85eeb) was just released which fixed...
@all-contributors please add @creatormir for bug
> I don’t understand well, but what is the logic in leaving empty cells in the array? @creatormir, one caveat is that because holes might exist in the array, the...
> It's effective to do [this](https://jsfiddle.net/creatormir/sqnxt0c6/13/)? > > ``` > van.derive(() => { > placeholder.hidden = items.arr.filter(v=>v).length > 0 ; > } ); > ``` > or > ``` >...