@thinkpixellab-public/px-vue 5.3.8 → 5.3.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -129,21 +129,19 @@ export default {
129
129
  }
130
130
 
131
131
  const refName = this.getTabContentRefName(this.selectedItem);
132
+ const selected = this.$refs[refName]?.[0];
132
133
 
133
- if (!this.$refs[refName]) {
134
+ // the selected tab may not be rendered yet (the items/selectedKeys
135
+ // watchers re-run this once it is)
136
+ if (!selected) {
137
+ this.selectorVisible = false;
134
138
  return;
135
139
  }
136
140
 
137
- const selected = this.$refs[refName][0];
138
141
  const selectedRect = getClientRect(selected, this.$refs.tabs);
139
-
140
- if (selected) {
141
- this.selectorVisible = true;
142
- this.selectorOffset = selectedRect.left;
143
- this.selectorWidth = selectedRect.width;
144
- } else {
145
- this.selectorVisible = false;
146
- }
142
+ this.selectorVisible = true;
143
+ this.selectorOffset = selectedRect.left;
144
+ this.selectorWidth = selectedRect.width;
147
145
 
148
146
  if (this.scrolls && this.animated) {
149
147
  selected.scrollIntoView({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thinkpixellab-public/px-vue",
3
- "version": "5.3.8",
3
+ "version": "5.3.9",
4
4
  "description": "General purpose Vue components and helpers that can be used across projects.",
5
5
  "author": {
6
6
  "name": "Pixel Lab"