fix: loading tasks with infinite scroll in kanban buckets #920

Merged
konrad merged 1 commits from fix/infinite-scroll-buckets into main 2021-10-31 13:37:19 +00:00
Owner
No description provided.
konrad added 1 commit 2021-10-31 12:46:08 +00:00
Author
Owner

Ping @dpschen I think this is a regression introduced when migrating to vue 3.

Ping @dpschen I think this is a regression introduced when migrating to vue 3.
Member

Ping @dpschen I think this is a regression introduced when migrating to vue 3.

Possible =) Don't remember this to have happened though.

> Ping @dpschen I think this is a regression introduced when migrating to vue 3. Possible =) Don't remember this to have happened though.
dpschen reviewed 2021-10-31 12:55:45 +00:00
@ -232,3 +232,1 @@
const bucketIndex = findIndexById(ctx.state.buckets, bucketId)
const isLoading = ctx.state.bucketLoading[bucketIndex] ?? false
const isLoading = ctx.state.bucketLoading[bucketId] ?? false

It does make sense to use the bucketId directly.

Regardless of that: shouldn't the findIndexById not also return the correct index — which should be identical to the id?

If so the findIndexById method should either be fixed or not used at all.

I used [bucketId] instead of index because I thought this would make it easier to refactor the bucket to use objects with ids as keys in the future.

It does make sense to use the bucketId directly. Regardless of that: shouldn't the `findIndexById` not also return the correct index — which should be identical to the id? If so the `findIndexById` method should either be fixed or not used at all. I used `[bucketId]` instead of index because I thought this would make it easier to refactor the bucket to use objects with ids as keys in the future.
Author
Owner

shouldn't the findIndexById not also return the correct index — which should be identical to the id?

It looks like it does not. Why should the index be identical to the id? The index ist just the position of the object in the array?

> shouldn't the findIndexById not also return the correct index — which should be identical to the id? It looks like it does not. Why should the index be identical to the id? The index ist just the position of the object in the array?

:D :D

That really does make sense!

I have not clue, I guess I just (mis)read this to be true when I wrote that code.
We should probably look out for other unresolved issues in combination with that findIndexById function.

:D :D That really does make sense! I have not clue, I guess I just (mis)read this to be true when I wrote that code. We should probably look out for other unresolved issues in combination with that `findIndexById` function.
konrad marked this conversation as resolved
dpschen approved these changes 2021-10-31 13:24:31 +00:00
konrad merged commit 7aede352f1 into main 2021-10-31 13:37:19 +00:00
konrad deleted branch fix/infinite-scroll-buckets 2021-10-31 13:37:19 +00:00
This repo is archived. You cannot comment on pull requests.
No description provided.