arrangeBy never resolves if the arrangement does not change
flekschas opened this issue · comments
Fritz Lekschas commented
In a simple setting, like the following, where piling.arrangeBy();
does not lead to a position change. The returned Promise
never resolves.
piling.subscribe('itemUpdate', async () => {
// Piles are naturally ordered by year so the following call should not change the pile positions
await piling.arrangeBy('data', 'year');
// we will never get here because the arrangement never changed and `pilesPositionEnd` never fired
}, 1);