-
Notifications
You must be signed in to change notification settings - Fork 30
Fix teleport to wrong instance when multiple analysis views open #2163
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
base: master
Are you sure you want to change the base?
Conversation
:sort-input-teleport-target="toolbar?.id" | ||
:sort-input-teleport-target="toolbarRef" |
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.
Avoid clashing IDs by specifying the template ref (HTML element) itself as the teleport target
/** @type {import('vue').Ref<HTMLElement>} template ref */ | ||
const toolbar = ref(null) | ||
const toolbarRef = useTemplateRef('toolbar') | ||
|
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.
This is somewhat tangential, but is a newer (clearer IMO) way of defining template refs in Vue 3.5
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.
LGTM, but haven't tested.
a604e6b
to
66108d8
Compare
Just added a test |
66108d8
to
f3fb6a4
Compare
Ping @JAllen42 are you able to test out that this fixes the issue? |
Fixes a bug not recorded in an issue.
Steps to reproduce
Open 2 analysis view tabs in the same workspace, then switch to the box plot or time series mode in the second one. You would find the sorting control does not appear here, but if you go back to the first analysis view tab it will be there instead.
Check List
CONTRIBUTING.md
and added my name as a Code Contributor.?.?.x
branch.