ps-toolkit-ui 1.20.67 → 1.20.68

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.
@@ -6317,9 +6317,16 @@
6317
6317
  };
6318
6318
  FormSelectComponent.prototype.selectOption = function (v, isEdit) {
6319
6319
  if (isEdit === void 0) { isEdit = false; }
6320
- this.inp.error = null;
6321
6320
  var va = this.getValue(v);
6322
- if (this.inp.multiple) {
6321
+ if (this.inp.type === exports.InputType.SelectSearchRadio && va.options.length !== 0) {
6322
+ return;
6323
+ }
6324
+ this.inp.error = null;
6325
+ if (this.inp.type === exports.InputType.SelectSearchRadio) {
6326
+ this.toggleRadio(va);
6327
+ this.inp.search = '';
6328
+ }
6329
+ else if (this.inp.multiple) {
6323
6330
  this.toggle(va);
6324
6331
  this.inp.search = '';
6325
6332
  }
@@ -6355,6 +6362,17 @@
6355
6362
  this.cI('Tab');
6356
6363
  }
6357
6364
  };
6365
+ FormSelectComponent.prototype.toggleRadio = function (op) {
6366
+ if (op.selected) {
6367
+ this.inp.value = null;
6368
+ op.selected = false;
6369
+ }
6370
+ else {
6371
+ this.inp.value = op.value;
6372
+ this.inp.options.filter(function (x) { return x.parent.value === op.parent.value; }).forEach(function (x) { return x.selected = false; });
6373
+ op.selected = true;
6374
+ }
6375
+ };
6358
6376
  FormSelectComponent.prototype.toggle = function (op) {
6359
6377
  if (op.selected) {
6360
6378
  this.inp.value = null;