Skip to content

feat: rewrite the ObservableArray #9067

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

Draft
wants to merge 4 commits into
base: release/8.0.0
Choose a base branch
from

Conversation

farfromrefug
Copy link
Collaborator

@farfromrefug farfromrefug commented Nov 25, 2020

This is now an ArrayLike object. Meaning we can do test[4]= 4; and the array will be changed as well as a change event trigger.
It should work exactly as the current implementation.
One nice feature i would have liked which does not work yet is test instanceof Array.
If that was to work it means an ObservableArray could be used anywhere and even passed to native methods (i think)

Forgot to say why i started this. This PR also brings all array like methods to ObservableArray like findIndex

This is now an ArrayLike object. Meaning we can do `test[4]= 4;` and the array will be changed as well as a change event trigger.
It should work exactly as the current implementation.
One nice feature i would have liked which does not work yet is ` test instanceof Array`.
If that was to work it means an `ObservableArray` could be used anywhere and even passed to native methods (i think)
@cla-bot cla-bot bot added the cla: yes label Nov 25, 2020
@farfromrefug
Copy link
Collaborator Author

I found some issues with the WeakMap and that new implementation. That PR is not ready yet

@rigor789 rigor789 marked this pull request as draft November 25, 2020 16:49
@NathanWalker NathanWalker changed the base branch from master to release/8.0.0 January 29, 2021 20:25
@NathanWalker NathanWalker added this to the 8.4 milestone Aug 16, 2022
@NathanWalker NathanWalker removed this from the 8.4 milestone Nov 24, 2022
@NathanWalker NathanWalker added this to the 9.0 milestone Sep 2, 2023
@NathanWalker
Copy link
Contributor

@farfromrefug If this were ready soon we could likely include in 8.6, would just need to check any breaking changes to mention if so. Otherwise can target 9.0.

@farfromrefug
Copy link
Collaborator Author

@NathanWalker that one is really old. I will check if I use it in my fork. Doesn't Dimitris created one doing a better job?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants