Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

immutableTop option #230

Merged
merged 13 commits into from
Aug 17, 2019
Merged

immutableTop option #230

merged 13 commits into from
Aug 17, 2019

Conversation

dhilt
Copy link
Member

@dhilt dhilt commented Aug 16, 2019

For issue #229. Adapter.applyUpdates method got new options argument:

  • applyUpdates(index, newItems, options)
  • applyUpdates(updater, options)

The options is an object that might contain immutableTop boolean property:

{ immutableTop: true }

The default value is false, which provides backward compatibility.

If the value of immutableTop option is true, left border index of Buffer array will never change during insert/delete operations. For example, removing first item in "1: item 1", "2: item 2", "3: item 3" list will result in "1: item2", "2: item 3" list. Here the template is {{$index}}: {{item}}.

@priandsf
Copy link
Contributor

That was a quick turnaround :-)
The changes you made are actually the exact same ones that I made, except that you used an options object while I used a simple boolean param. But that's fair, the objects gives more options going forward.
I merged your changes into our own private branch and it worked like a charm. Thanks a lot!

@dhilt dhilt merged commit 0182953 into master Aug 17, 2019
@dhilt dhilt deleted the immutable-top branch August 17, 2019 00:44
@dhilt dhilt restored the immutable-top branch August 17, 2019 00:58
@dhilt dhilt deleted the immutable-top branch October 2, 2020 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants