@dataloop-ai/components 0.20.55 → 0.20.56

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.20.55",
3
+ "version": "0.20.56",
4
4
  "exports": {
5
5
  ".": "./index.ts",
6
6
  "./models": "./models.ts",
@@ -122,8 +122,12 @@ export default defineComponent({
122
122
  const setHighlightedIndex = (value: any) => {
123
123
  highlightedIndex.value = value
124
124
 
125
+ const portalEl =
126
+ typeof menu.value?.portalEl === 'string'
127
+ ? document.querySelector(menu.value.portalEl)
128
+ : menu.value?.portalEl
125
129
  const element =
126
- menu.value?.portalEl.querySelectorAll?.('.dl-list-item')[value]
130
+ portalEl?.querySelectorAll?.('.dl-list-item')[value]
127
131
  if (element) {
128
132
  if (element.scrollIntoViewIfNeeded) {
129
133
  element.scrollIntoViewIfNeeded()