-
-
Notifications
You must be signed in to change notification settings - Fork 130
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
Check for hidden items before re-rendering #531
Conversation
Thanks for submitting your first pull request! You are awesome! 🤗 |
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.
Thanks @alec-kr
Could you trigger an update when the command palette is visible? This will ensure we apply the command palette updates shunted when it was hidden.
protected onAfterShow(msg: Message): {
this.update();
super.onAfterShow(msg);
}
Reference inherited method:
lumino/packages/widgets/src/widget.ts
Line 670 in 38757e2
protected onAfterShow(msg: Message): void {} |
Sure! I've updated the method. Is this correct? Edit: I definitely didn't do this right. Where exactly should this change be made? Sorry about the confusion |
Sorry my fault I mislead you by referring to the inherited method. You need to add my snippet within the lumino/packages/widgets/src/commandpalette.ts Line 274 in e1e1b11 |
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.
Thanks @alec-kr
Thank you for your patience 😄 |
This PR fixes issue #13677 from jupyterlab.
Issue
Hidden items are still being re-rendered, despite the fact that they shouldn't be.
Solution
Added a check to
onUpdateRequest
to determine if an item is hidden, before re-rendering it. This will prevent hidden items from being re-rendered, thus solving the issue.