ps-toolkit-ui 1.20.80 → 1.20.83
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/bundles/ps-toolkit-ui.umd.js +6 -8
- package/bundles/ps-toolkit-ui.umd.js.map +1 -1
- package/bundles/ps-toolkit-ui.umd.min.js +1 -1
- package/bundles/ps-toolkit-ui.umd.min.js.map +1 -1
- package/esm2015/lib/components/form/select/form.select.component.js +7 -9
- package/fesm2015/ps-toolkit-ui.js +6 -8
- package/fesm2015/ps-toolkit-ui.js.map +1 -1
- package/package.json +1 -1
|
@@ -6101,7 +6101,7 @@
|
|
|
6101
6101
|
this.inp.load();
|
|
6102
6102
|
}
|
|
6103
6103
|
this.inp.setValue = function (v, isEdit) {
|
|
6104
|
-
if (!_this.inp.multiple && _this.inp.type
|
|
6104
|
+
if (!_this.inp.multiple && _this.inp.type !== exports.InputType.SelectSearchRadio) {
|
|
6105
6105
|
_this.selectOption(v == null ? null : v.toString(), isEdit);
|
|
6106
6106
|
}
|
|
6107
6107
|
else {
|
|
@@ -6122,8 +6122,8 @@
|
|
|
6122
6122
|
};
|
|
6123
6123
|
this.inp.isValid = function () {
|
|
6124
6124
|
_this.inp.error = null;
|
|
6125
|
-
if (_this.inp.required && ((!_this.inp.multiple && ((_this.inp.addNew && !_this.inp.search) || (!_this.inp.addNew && !_this.inp.value))) ||
|
|
6126
|
-
(_this.inp.multiple && _this.inp.getSelected().length === 0))) {
|
|
6125
|
+
if (_this.inp.required && ((!_this.inp.multiple && _this.inp.type !== exports.InputType.SelectSearchRadio && ((_this.inp.addNew && !_this.inp.search) || (!_this.inp.addNew && !_this.inp.value))) ||
|
|
6126
|
+
((_this.inp.multiple || _this.inp.type === exports.InputType.SelectSearchRadio) && _this.inp.getSelected().length === 0))) {
|
|
6127
6127
|
_this.inp.error = exports.InputError.Required;
|
|
6128
6128
|
return false;
|
|
6129
6129
|
}
|
|
@@ -6151,7 +6151,7 @@
|
|
|
6151
6151
|
};
|
|
6152
6152
|
this.inp.data = function () {
|
|
6153
6153
|
var d = {};
|
|
6154
|
-
if (_this.inp.multiple) {
|
|
6154
|
+
if (_this.inp.multiple || _this.inp.type === exports.InputType.SelectSearchRadio) {
|
|
6155
6155
|
d[_this.inp.name] = _this.inp.getSelected();
|
|
6156
6156
|
d[_this.inp.name + 'Name'] = _this.inp.getSelectedName();
|
|
6157
6157
|
return d;
|
|
@@ -6287,7 +6287,7 @@
|
|
|
6287
6287
|
}
|
|
6288
6288
|
};
|
|
6289
6289
|
FormSelectComponent.prototype.toggleOption = function (e) {
|
|
6290
|
-
if (this.inp.multiple && $__namespace(e.target).closest('.option').hasClass('option')) {
|
|
6290
|
+
if ((this.inp.multiple || this.inp.type === exports.InputType.SelectSearchRadio) && $__namespace(e.target).closest('.option').hasClass('option')) {
|
|
6291
6291
|
return;
|
|
6292
6292
|
}
|
|
6293
6293
|
this.openOptions();
|
|
@@ -6317,9 +6317,7 @@
|
|
|
6317
6317
|
};
|
|
6318
6318
|
FormSelectComponent.prototype.selectOption = function (v, isEdit) {
|
|
6319
6319
|
if (isEdit === void 0) { isEdit = false; }
|
|
6320
|
-
console.log(v, this.inp.options);
|
|
6321
6320
|
var va = this.getValue(v);
|
|
6322
|
-
console.log(va);
|
|
6323
6321
|
if (this.inp.type === exports.InputType.SelectSearchRadio && va.options.length !== 0) {
|
|
6324
6322
|
return;
|
|
6325
6323
|
}
|
|
@@ -6556,7 +6554,7 @@
|
|
|
6556
6554
|
};
|
|
6557
6555
|
FormSelectComponent.prototype.getPlaceHolder = function () {
|
|
6558
6556
|
var _this = this;
|
|
6559
|
-
if (this.inp.multiple) {
|
|
6557
|
+
if (this.inp.multiple || this.inp.type === exports.InputType.SelectSearchRadio) {
|
|
6560
6558
|
var s = this.inp.getSelectedOptions();
|
|
6561
6559
|
if (s.length > 0) {
|
|
6562
6560
|
return s.map(function (x) { return _this.inp.l(x.name); }).join(', ');
|