-
Notifications
You must be signed in to change notification settings - Fork 296
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/remove file #2018
Fix/remove file #2018
Conversation
…e for 'file-remove-requested' event, otherwise removing files for subclassers won't work
…e for 'file-remove-requested' event, otherwise removing files for subclassers won't work
🦋 Changeset detectedLatest commit: bee1169 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Yeah, noticed this before as well. Would be nice if there was a faling test for this. I don't think it's a good idea to leak private events, though. We could replace this:
with: get _fileListNode() {
return Array.from(this.children).filter(child => child.slot === 'selected-file-list');
}
connectedCallback() {
super.connectedCallback();
// ...
this._fileListNode.addEventListener(
'file-remove-requested',
/** @type {EventListener} */ (this._onRemoveFile),
);
}
// and remove on disconnected The event then only needs to communicate with its parent without "polluting" the rest of the dom tree. |
This still doesn't work without |
…irectly on lion-selected-file-list
19109ae
to
fcf9c7c
Compare
fcf9c7c
to
bee1169
Compare
What I did