inviton-powerduck 0.0.188 → 0.0.189
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/components/dropdown/index.tsx +12 -12
- package/package.json +1 -1
|
@@ -65,7 +65,7 @@ interface DropdownListArgs extends FormItemWrapperArgs {
|
|
|
65
65
|
containerCssClass?: string;
|
|
66
66
|
options: Array<string> | Array<DropdownOptionGroup> | Array<any>;
|
|
67
67
|
selected: string | any | Array<string> | Array<any>;
|
|
68
|
-
displayMode?: 'default' | 'inline'
|
|
68
|
+
displayMode?: 'default' | 'inline';
|
|
69
69
|
displayMember?: string | RowToString;
|
|
70
70
|
valueMember?: string | RowToString;
|
|
71
71
|
multiselect?: boolean;
|
|
@@ -144,7 +144,7 @@ class DropdownListComponent extends TsxComponent<DropdownListArgs> implements Dr
|
|
|
144
144
|
@Prop() displayMember!: (row) => string | string;
|
|
145
145
|
@Prop() valueMember!: (row) => string | string;
|
|
146
146
|
@Prop() selected!: string | any | Array<string> | Array<any>;
|
|
147
|
-
@Prop() displayMode?: 'default' | 'inline'
|
|
147
|
+
@Prop() displayMode?: 'default' | 'inline';
|
|
148
148
|
@Prop() changed: (newValue: string | any | Array<string> | Array<any>, exclusivity?: MultiSelectExclusivity) => void;
|
|
149
149
|
@Prop() afterBound: (elem: JQuery<Element>, select2Instance: any) => void;
|
|
150
150
|
@Prop() maxWidth?: number;
|
|
@@ -462,10 +462,10 @@ class DropdownListComponent extends TsxComponent<DropdownListArgs> implements Dr
|
|
|
462
462
|
const self = this;
|
|
463
463
|
return (row) => {
|
|
464
464
|
const retVal = $(`<span class="s2-ri-withtb">${row.text
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
465
|
+
}<button class="s2-trailing-button ${self.trailingButton.cssClass || ''
|
|
466
|
+
} btn-sm">${self.trailingButton.icon != null ? `<i class="${self.trailingButton.icon}"></i> ` : ''
|
|
467
|
+
}${self.trailingButton.text || ''
|
|
468
|
+
}</button></span>`);
|
|
469
469
|
retVal.find('button').click((e) => {
|
|
470
470
|
try {
|
|
471
471
|
clearTimeout(self.preventDefaultTimeout);
|
|
@@ -556,10 +556,10 @@ class DropdownListComponent extends TsxComponent<DropdownListArgs> implements Dr
|
|
|
556
556
|
useListviewBuilder: false,
|
|
557
557
|
formatSelection: this.customRenderSelectionResult != null
|
|
558
558
|
? this.handleCustomRenderResult(
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
559
|
+
h,
|
|
560
|
+
this.customRenderSelectionResult,
|
|
561
|
+
'mobile',
|
|
562
|
+
)
|
|
563
563
|
: null,
|
|
564
564
|
formatResult: this.getCustomFormatOptions(h, 'mobile'),
|
|
565
565
|
onItemSelected: (items, exclusivity) => {
|
|
@@ -760,7 +760,7 @@ class DropdownListComponent extends TsxComponent<DropdownListArgs> implements Dr
|
|
|
760
760
|
}
|
|
761
761
|
|
|
762
762
|
displayInline(): boolean {
|
|
763
|
-
if (this.displayMode == null
|
|
763
|
+
if (this.displayMode == null || this.displayMode == 'default') {
|
|
764
764
|
return false;
|
|
765
765
|
}
|
|
766
766
|
|
|
@@ -1310,7 +1310,7 @@ class DropdownListComponent extends TsxComponent<DropdownListArgs> implements Dr
|
|
|
1310
1310
|
}
|
|
1311
1311
|
|
|
1312
1312
|
oldTrigger.call(instance.dropdown.$search, ev);
|
|
1313
|
-
}
|
|
1313
|
+
};
|
|
1314
1314
|
|
|
1315
1315
|
setTimeout(() => {
|
|
1316
1316
|
instance.open();
|