@dataloop-ai/components 0.20.2 → 0.20.3

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.2",
3
+ "version": "0.20.3",
4
4
  "exports": {
5
5
  ".": "./index.ts",
6
6
  "./models": "./models.ts",
@@ -121,6 +121,16 @@ export default defineComponent({
121
121
 
122
122
  const setHighlightedIndex = (value: any) => {
123
123
  highlightedIndex.value = value
124
+
125
+ const element =
126
+ menu.value?.portalEl.querySelectorAll('.dl-list-item')[value]
127
+ if (element) {
128
+ if (element.scrollIntoViewIfNeeded) {
129
+ element.scrollIntoViewIfNeeded()
130
+ } else {
131
+ element.scrollIntoView()
132
+ }
133
+ }
124
134
  }
125
135
  const handleSelectedItem = (value: any) => {
126
136
  if (!value) {
@@ -1,17 +1,8 @@
1
1
  <template>
2
2
  <div>
3
- <dl-switch
4
- v-model="lines"
5
- left-label="code lines"
6
- />
7
- <dl-switch
8
- v-model="readonly"
9
- left-label="readonly"
10
- />
11
- <dl-switch
12
- v-model="bordered"
13
- left-label="bordered"
14
- />
3
+ <dl-switch v-model="lines" left-label="code lines" />
4
+ <dl-switch v-model="readonly" left-label="readonly" />
5
+ <dl-switch v-model="bordered" left-label="bordered" />
15
6
  <dl-code-editor
16
7
  v-model="codeEditorValue"
17
8
  width="45vw"
@@ -195,7 +186,7 @@ if __name__ == "__main__":
195
186
  }))
196
187
 
197
188
  watch(codeEditorValue, (val) => {
198
- console.log('@@@', val)
189
+ console.log('Code Value Changed: ', val)
199
190
  })
200
191
 
201
192
  return {
@@ -50,20 +50,18 @@ export default defineComponent({
50
50
  },
51
51
  watch: {
52
52
  value(newValue, oldValue) {
53
- console.log(`@@@ model value update ${oldValue} to ${newValue}`)
54
- this.events[0] = `@@@ model value update ${oldValue} to ${newValue}`
53
+ this.events[0] = `model value update ${oldValue} to ${newValue}`
55
54
  }
56
55
  },
57
56
  methods: {
58
57
  handleChange(value: number) {
59
- console.log(`@@@ handling change ${value}`)
60
- this.events[1] = `@@@ handling change ${value}`
58
+ this.events[1] = `handling change ${value}`
61
59
  },
62
60
  handleFocus(event: Event) {
63
- this.events[1] = `@@@ Input Focus `
61
+ this.events[1] = `Input Focus `
64
62
  },
65
63
  handleBlur(event: Event) {
66
- this.events[1] = `@@@ Input Blur `
64
+ this.events[1] = `Input Blur `
67
65
  }
68
66
  },
69
67
  template: 'dl-slider-demo'