@dataloop-ai/components 0.19.108 → 0.19.109
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
|
@@ -235,6 +235,7 @@
|
|
|
235
235
|
:children="getOptionChildren(item)"
|
|
236
236
|
:capitalized="capitalizedOptions"
|
|
237
237
|
:readonly="isReadonlyOption(item)"
|
|
238
|
+
:is-expanded="item.expanded"
|
|
238
239
|
@update:model-value="handleModelValueUpdate"
|
|
239
240
|
@click="selectOption(item)"
|
|
240
241
|
@selected="handleSelected"
|
|
@@ -283,6 +284,7 @@
|
|
|
283
284
|
:children="getOptionChildren(option)"
|
|
284
285
|
:capitalized="capitalizedOptions"
|
|
285
286
|
:readonly="isReadonlyOption(option)"
|
|
287
|
+
:is-expanded="option.expanded"
|
|
286
288
|
@update:model-value="handleModelValueUpdate"
|
|
287
289
|
@click="selectOption(option)"
|
|
288
290
|
@selected="handleSelected"
|
|
@@ -98,6 +98,7 @@
|
|
|
98
98
|
:with-wave="withWave"
|
|
99
99
|
:capitalized="capitalized"
|
|
100
100
|
:readonly="isReadonlyOption(child)"
|
|
101
|
+
:is-expanded="isExpanded"
|
|
101
102
|
@update:model-value="handleCheckboxUpdate"
|
|
102
103
|
@selected="handleSingleSelect"
|
|
103
104
|
@deselected="handleSingleDeselect"
|
|
@@ -148,7 +149,11 @@ export default defineComponent({
|
|
|
148
149
|
depth: { type: Number, default: 0 },
|
|
149
150
|
label: { type: String, default: null },
|
|
150
151
|
capitalized: { type: Boolean, default: false },
|
|
151
|
-
readonly: { type: Boolean, default: false }
|
|
152
|
+
readonly: { type: Boolean, default: false },
|
|
153
|
+
isExpanded: {
|
|
154
|
+
type: Boolean,
|
|
155
|
+
default: false
|
|
156
|
+
}
|
|
152
157
|
},
|
|
153
158
|
emits: [
|
|
154
159
|
'update:model-value',
|
|
@@ -159,7 +164,7 @@ export default defineComponent({
|
|
|
159
164
|
],
|
|
160
165
|
data() {
|
|
161
166
|
return {
|
|
162
|
-
showChildren:
|
|
167
|
+
showChildren: this.isExpanded,
|
|
163
168
|
componentId: v4(),
|
|
164
169
|
uuid: `dl-select-option-${v4()}`
|
|
165
170
|
}
|
|
@@ -555,6 +555,21 @@
|
|
|
555
555
|
</div>
|
|
556
556
|
</template>
|
|
557
557
|
</dl-select>
|
|
558
|
+
|
|
559
|
+
Select with multiselect auto expanded
|
|
560
|
+
<dl-select
|
|
561
|
+
v-model="selectedWithChildrenAndReadonly"
|
|
562
|
+
:options="treeOptionsExpanded"
|
|
563
|
+
multiselect
|
|
564
|
+
style="margin-bottom: 150px"
|
|
565
|
+
>
|
|
566
|
+
<template #option="scope">
|
|
567
|
+
<div style="padding: 5px 0px">
|
|
568
|
+
<div>{{ scope.opt.label }}</div>
|
|
569
|
+
<div>{{ scope.opt.subLabel }}</div>
|
|
570
|
+
</div>
|
|
571
|
+
</template>
|
|
572
|
+
</dl-select>
|
|
558
573
|
</div>
|
|
559
574
|
</template>
|
|
560
575
|
|
|
@@ -719,6 +734,42 @@ const treeOptionsWithReadonly = [
|
|
|
719
734
|
}
|
|
720
735
|
]
|
|
721
736
|
|
|
737
|
+
const treeOptionsExpanded: DlSelectOptionType[] = [
|
|
738
|
+
{
|
|
739
|
+
label: 'Readonly option with children & readonly child',
|
|
740
|
+
value: 'r6',
|
|
741
|
+
expanded: true,
|
|
742
|
+
children: [
|
|
743
|
+
{ label: 'child 1', value: 'c6' },
|
|
744
|
+
{ label: 'child 2', value: 'c7' },
|
|
745
|
+
{
|
|
746
|
+
label: 'child 3',
|
|
747
|
+
value: 'c8',
|
|
748
|
+
expanded: true,
|
|
749
|
+
children: [
|
|
750
|
+
{ label: 'child 4', value: 'c9' },
|
|
751
|
+
{
|
|
752
|
+
label: 'child 5',
|
|
753
|
+
value: 'c10441',
|
|
754
|
+
expanded: true,
|
|
755
|
+
children: [
|
|
756
|
+
{
|
|
757
|
+
label: 'child 6',
|
|
758
|
+
value: 'c8312',
|
|
759
|
+
expanded: true,
|
|
760
|
+
children: [
|
|
761
|
+
{ label: 'child 7', value: 'c923' },
|
|
762
|
+
{ label: 'child 8', value: 'c101' }
|
|
763
|
+
]
|
|
764
|
+
}
|
|
765
|
+
]
|
|
766
|
+
}
|
|
767
|
+
]
|
|
768
|
+
}
|
|
769
|
+
]
|
|
770
|
+
}
|
|
771
|
+
]
|
|
772
|
+
|
|
722
773
|
export default defineComponent({
|
|
723
774
|
components: { DlSelect, DlIcon, DlChip, DlBadge },
|
|
724
775
|
data() {
|
|
@@ -742,6 +793,7 @@ export default defineComponent({
|
|
|
742
793
|
searchOptions: defaultOptions,
|
|
743
794
|
treeOptions,
|
|
744
795
|
treeOptionsWithReadonly,
|
|
796
|
+
treeOptionsExpanded,
|
|
745
797
|
selectedBySearch: undefined,
|
|
746
798
|
selectedByFilteringSearch: [],
|
|
747
799
|
selectedWithEmitValue: 'c1',
|