Welcome to the Vue feedback portal. We’re happy you’re here! If you have feedback on how to improve the Vue, we’d love to hear it!

  • Check out the features or bugs others have reported and vote on your favorites. Feedback will be prioritized based on popularity.
  • If you have feedback that’s not listed yet, submit your own.

Thanks for joining our community and helping improve Syncfusion products!

1
Vote

Noticed this issue with the Vue ListBox, but it appears to track down into the the DropDownBase code and affects all packages.


If an array of objects is bound to the datasource where the value field is a number type, the value (selected items) emits a null value because the parsing code does a strict compare against the data-value which is a string


Items: [{ text: "Test", value: 1}]


DropDownBase.prototype.getDataByValue = function (value) { if (!isNullOrUndefined(this.listData)) { var type = this.typeOfData(this.listData).typeof; if (type === 'string' || type === 'number' || type === 'boolean') { for (var _i = 0, _a = this.listData; _i < _a.length; _i++) { var item = _a[_i]; if (!isNullOrUndefined(item) && item === value) { return item; } } } else { for (var _b = 0, _c = this.listData; _b < _c.length; _b++) { var item = _c[_b];

//for example this line compares a string of "1" to a value of 1 which fails so the value emitted is null if (!isNullOrUndefined(item) && getValue((this.fields.value ? this.fields.value : 'value'), item) === value) { return item; } } } } return null; };