@dataloop-ai/components 0.16.32 → 0.16.33

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dataloop-ai/components",
3
- "version": "0.16.32",
3
+ "version": "0.16.33",
4
4
  "exports": {
5
5
  ".": "./index.ts",
6
6
  "./models": "./models.ts",
@@ -172,6 +172,7 @@
172
172
  :highlight-selected="highlightSelected"
173
173
  total-items
174
174
  @update:model-value="selectAll"
175
+ @depth-change="handleDepthChange"
175
176
  >
176
177
  <slot
177
178
  v-if="hasAllItemsSlot"
@@ -201,6 +202,7 @@
201
202
  @click="selectOption(option)"
202
203
  @selected="handleSelected"
203
204
  @deselected="handleDeselected"
205
+ @depth-change="handleDepthChange"
204
206
  >
205
207
  <slot
206
208
  v-if="hasOptionSlot"
@@ -560,6 +562,15 @@ export default defineComponent({
560
562
  this.setSelectedIndex()
561
563
  },
562
564
  methods: {
565
+ handleDepthChange() {
566
+ // todo: remove this hack
567
+ setTimeout(() => {
568
+ this.$nextTick(() => {
569
+ // @ts-ignore
570
+ this.$refs.menu?.updatePosition()
571
+ })
572
+ }, 100)
573
+ },
563
574
  isPrimitiveValue(option: any): boolean {
564
575
  return (
565
576
  typeof option === 'string' ||
@@ -90,6 +90,7 @@
90
90
  @update:model-value="handleCheckboxUpdate"
91
91
  @selected="handleSingleSelect"
92
92
  @deselected="handleSingleDeselect"
93
+ @depth-change="$emit('depth-change')"
93
94
  />
94
95
  </div>
95
96
  </div>
@@ -135,7 +136,13 @@ export default defineComponent({
135
136
  label: { type: String, default: null },
136
137
  capitalized: { type: Boolean, default: false }
137
138
  },
138
- emits: ['update:model-value', 'click', 'selected', 'deselected'],
139
+ emits: [
140
+ 'update:model-value',
141
+ 'click',
142
+ 'selected',
143
+ 'deselected',
144
+ 'depth-change'
145
+ ],
139
146
  data() {
140
147
  return {
141
148
  showChildren: false,
@@ -190,6 +197,7 @@ export default defineComponent({
190
197
  },
191
198
  chevronClick(e: Event) {
192
199
  e.stopPropagation()
200
+ this.$emit('depth-change')
193
201
  this.handleChildren(e)
194
202
  },
195
203
  toggleChildren() {