-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
fix(vue): unmount teleported user component #26543
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't get why this would fix the issue since these two code snippets should yield the same results:
const toRemove = '3';
let dataArray = ['1', '2', '3', '4', '5'];
dataArray = dataArray.filter(i => i !== toRemove);
console.log(dataArray);
// ['1', '2', '4', '5']
const toRemove = '3';
let dataArray = ['1', '2', '3', '4', '5'];
const index = dataArray.findIndex(i => i === toRemove);
dataArray.splice(index, 1);
console.log(dataArray);
// ['1', '2', '4', '5']
There shouldn't be a difference in the implementations with static data, but for some reason there is a tangible difference in the outcome with our instance, where I've ran the same test at least 30 times while locally debugging and it is consistent with Is this some weird Vue quirk with shallow refs and rendering? |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but can we add a comment that explains why we need to use splice
here?
Pull request checklist
Please check if your PR fulfills the following requirements:
ionic-docs
repo, in a separate PR. See the contributing guide for details.npm run build
) was run locally and any changes were pushednpm run lint
) has passed locally and any fixes were made for failuresPull request type
Please check the type of change your PR introduces:
What is the current behavior?
Presenting a modal immediately after dismissing a modal, can incorrectly clear the contents of the presented modal.
Issue URL: #26542
What is the new behavior?
splice
instead offilter
.Does this introduce a breaking change?
Other information
Dev-build:
6.4.2-dev.11672257788.1a6cf37c