@dataloop-ai/components 0.20.144 → 0.20.146
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
|
@@ -646,7 +646,8 @@ export default defineComponent({
|
|
|
646
646
|
'enter',
|
|
647
647
|
'file-update',
|
|
648
648
|
'update:model-value',
|
|
649
|
-
'suggestion-click'
|
|
649
|
+
'suggestion-click',
|
|
650
|
+
'keydown'
|
|
650
651
|
],
|
|
651
652
|
setup(props, { emit }) {
|
|
652
653
|
const mouseOverClear = ref(false)
|
|
@@ -1155,6 +1156,8 @@ export default defineComponent({
|
|
|
1155
1156
|
return
|
|
1156
1157
|
}
|
|
1157
1158
|
|
|
1159
|
+
this.$emit('keydown', e)
|
|
1160
|
+
|
|
1158
1161
|
if (e.key !== 'Backspace') {
|
|
1159
1162
|
/**
|
|
1160
1163
|
* Allow only numbers
|
|
@@ -1640,3 +1643,4 @@ export default defineComponent({
|
|
|
1640
1643
|
}
|
|
1641
1644
|
}
|
|
1642
1645
|
</style>
|
|
1646
|
+
|
|
@@ -80,6 +80,7 @@
|
|
|
80
80
|
@blur="handleSearchBlur"
|
|
81
81
|
@keyup.enter="handleSearchEnter"
|
|
82
82
|
@keyup.esc="handleSearchEscape"
|
|
83
|
+
@keydown="handleSearchKeyDown"
|
|
83
84
|
/>
|
|
84
85
|
<dl-tooltip v-if="disabled && disabledTooltip">
|
|
85
86
|
{{ disabledTooltip }}
|
|
@@ -518,6 +519,7 @@ export default defineComponent({
|
|
|
518
519
|
'search-blur',
|
|
519
520
|
'search-enter',
|
|
520
521
|
'search-escape',
|
|
522
|
+
'search-keydown',
|
|
521
523
|
'filter',
|
|
522
524
|
'change',
|
|
523
525
|
'search-input',
|
|
@@ -1117,6 +1119,11 @@ export default defineComponent({
|
|
|
1117
1119
|
this.$emit('search-enter', e, this.searchInputValue)
|
|
1118
1120
|
}
|
|
1119
1121
|
},
|
|
1122
|
+
handleSearchKeyDown(e: KeyboardEvent): void {
|
|
1123
|
+
if (this.searchable) {
|
|
1124
|
+
this.$emit('search-keydown', e)
|
|
1125
|
+
}
|
|
1126
|
+
},
|
|
1120
1127
|
handleSearchEscape(e: Event): void {
|
|
1121
1128
|
if (this.searchable) {
|
|
1122
1129
|
this.$emit('search-escape', e, this.searchInputValue)
|
|
@@ -1127,9 +1134,7 @@ export default defineComponent({
|
|
|
1127
1134
|
|
|
1128
1135
|
const focusEvent = e as FocusEvent
|
|
1129
1136
|
const shouldKeepFocus =
|
|
1130
|
-
this.keepFocusOnBlur &&
|
|
1131
|
-
!focusEvent.relatedTarget &&
|
|
1132
|
-
this.isExpanded
|
|
1137
|
+
this.keepFocusOnBlur && !focusEvent.relatedTarget
|
|
1133
1138
|
|
|
1134
1139
|
this.$nextTick(() => {
|
|
1135
1140
|
const inputRef = this.$refs.searchInput as HTMLInputElement
|
|
@@ -482,6 +482,12 @@ export default defineComponent({
|
|
|
482
482
|
}
|
|
483
483
|
}
|
|
484
484
|
}
|
|
485
|
+
|
|
486
|
+
const clearSelectionWithRerender = () => {
|
|
487
|
+
clearSelection()
|
|
488
|
+
mainTableKey.value = v4()
|
|
489
|
+
}
|
|
490
|
+
|
|
485
491
|
const updateSelectionHierarchy = (
|
|
486
492
|
adding: boolean,
|
|
487
493
|
event: any,
|
|
@@ -943,7 +949,9 @@ export default defineComponent({
|
|
|
943
949
|
mainTbodyUuid,
|
|
944
950
|
vue2h,
|
|
945
951
|
containerClass,
|
|
946
|
-
computedFilter
|
|
952
|
+
computedFilter,
|
|
953
|
+
clearSelection,
|
|
954
|
+
clearSelectionWithRerender
|
|
947
955
|
}
|
|
948
956
|
},
|
|
949
957
|
// adding ignore here as overloading the render function like this is not a known type
|