Skip to content

Commit 6e558b6

Browse files
committed
SVY-20565 Multiselect with number returned in dataproviders
1 parent 35fc852 commit 6e558b6

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

components/projects/bootstrapcomponents/src/choicegroup/choicegroup.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ export class ServoyBootstrapChoicegroup extends ServoyBootstrapBasefield<HTMLDiv
4242
switch (property) {
4343
case 'dataProviderID':
4444
this.setSelectionFromDataprovider();
45-
this.allowMultiselect = Array.isArray(this.dataProviderID);
45+
if (change.firstChange){
46+
this.allowMultiselect = Array.isArray(this.dataProviderID);
47+
}
4648
break;
4749
case 'valuelistID':
4850
if (this.valuelistID && this.valuelistID.length > 0 && this.isValueListNull(this.valuelistID[0]))
@@ -93,7 +95,7 @@ export class ServoyBootstrapChoicegroup extends ServoyBootstrapBasefield<HTMLDiv
9395

9496
setSelectionFromDataprovider() {
9597
this.selection = [];
96-
if (this.dataProviderID === null || this.dataProviderID === undefined) return;
98+
if (this.dataProviderID === null || this.dataProviderID === undefined || (Array.isArray(this.dataProviderID) && this.dataProviderID.length == 1 && this.dataProviderID[0] == null)) return;
9799
const arr = (Array.isArray(this.dataProviderID)) ? this.dataProviderID : [this.dataProviderID];
98100
if (this.inputType === 'radio' && arr.length > 1) return;
99101
for (let i = 0; i < this.valuelistID.length; i++) {

0 commit comments

Comments
 (0)