ps-toolkit-ui 1.16.24 → 1.16.26

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.
@@ -6204,22 +6204,27 @@
6204
6204
  if (this.inp.onChange) {
6205
6205
  this.inp.onChange(this.inp, isEdit);
6206
6206
  }
6207
- if (this.inp.rel) {
6208
- this.inp.rel.value = null;
6209
- this.inp.rel.search = '';
6210
- this.inp.rel.options = [];
6207
+ this.clearRel(this.inp, v);
6208
+ if (!isEdit && !this.inp.multiple) {
6209
+ this.cI('Tab');
6210
+ }
6211
+ };
6212
+ FormSelectComponent.prototype.clearRel = function (i, v) {
6213
+ while (i.rel) {
6214
+ i.rel.value = null;
6215
+ i.rel.search = '';
6216
+ i.rel.options = [];
6211
6217
  if (v !== null) {
6212
- this.inp.rel.url = this.inp.relUrl.replace('{}', this.inp.value);
6213
- if (this.inp.rel.type !== exports.InputType.SelectAutoComplete) {
6214
- this.inp.rel.load();
6218
+ i.rel.url = i.relUrl.replace('{}', this.inp.value);
6219
+ if (i.rel.type !== exports.InputType.SelectAutoComplete) {
6220
+ i.rel.load();
6215
6221
  }
6216
6222
  else {
6217
- this.inp.rel.url += '_{}';
6223
+ i.rel.url += '_{}';
6218
6224
  }
6219
6225
  }
6220
- }
6221
- if (!isEdit && !this.inp.multiple) {
6222
- this.cI('Tab');
6226
+ i.rel = i.rel.rel;
6227
+ v = null;
6223
6228
  }
6224
6229
  };
6225
6230
  FormSelectComponent.prototype.toggle = function (op) {