Closed frysch closed 5 years ago
Thanks @frysch. Just checking, is it possible for the moved item to be in the current_order
list even when its with_same
attribute is changing? I guess that depends on the caching?
Thanks @frysch. Just checking, is it possible for the moved item to be in the
current_order
list even when itswith_same
attribute is changing? I guess that depends on the caching?
It seems to me that it's not possible, but i might miss something. Dunno if it causes any problems if it should happen thou, since it's working when not updating that with_same
attribute at the same time. 🤷♂️
Thanks @frysch, you're right because the finder
is cached but based on the new with_same
values. I was thinking it'd be cleaner to detect if the with_same
values had changed but that could get complicated.
I was thinking it'd be cleaner to detect if the
with_same
values had changed but that could get complicated.
That was actually my first approach as well. Turned out pretty messy. 😀
Haha all good. With regards to your other PR, I'll need more time to look at that one.
Haha all good. With regards to your other PR, I'll need more time to look at that one.
Take your time. And as i wrote there, do whatever you like with it. Dunno if it's too much of an edge case, or if it's something that ever would be used. Just needed to patch it a bit for our needs.
Thank you for this @frysch 👍 I was about to start working on a PR when I saw yours got merged already 😄
When updating the with_same attribute and at the same time setting a new
column_position
which caused a rebalancing there was aNoMethodError
thrown on line 215.Here's a possible fix.