ps-toolkit-ui 1.4.74 → 1.4.75

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.
@@ -1288,6 +1288,7 @@ class InputClass {
1288
1288
  this.disabled = false;
1289
1289
  this.inEditDisabled = false;
1290
1290
  this.inEditVisible = true;
1291
+ this.inEditRequired = true;
1291
1292
  this.displayLabel = true;
1292
1293
  this.withClear = false;
1293
1294
  this.minLength = -1;
@@ -1343,7 +1344,9 @@ class InputClass {
1343
1344
  this.type = type;
1344
1345
  this.value = value;
1345
1346
  this.default = typeof value === 'number' ? cloneDeep(value) : HelperClass.clone(value);
1347
+ this.baseRequired = required;
1346
1348
  this.required = required;
1349
+ this.inEditRequired = required;
1347
1350
  this.minLength = type === InputType.Mobile || type === InputType.Phone ? 11 :
1348
1351
  type === InputType.NationalCode || type === InputType.PostalCode ? 10 :
1349
1352
  type === InputType.Sheba ? 24 : minLength;
@@ -2267,14 +2270,16 @@ class TableRowComponent {
2267
2270
  this.table.form.setButtons(this.table.form.onTop, true, this.row.Data.Id);
2268
2271
  this.table.form.inputs.filter(x => x.inEditDisabled).forEach(x => x.disabled = true);
2269
2272
  this.table.form.inputs.filter(x => !x.inEditVisible).forEach(x => x.visible = false);
2273
+ this.table.form.inputs.forEach(x => x.required = x.inEditRequired);
2270
2274
  }
2271
2275
  else {
2272
2276
  new RequestClass(this.table.environment, this.table.l).send(this.getOptionUrl(option.Url.replace('update', 'get'), this.table.permissions.RelatedId, this.row.Data.Id), Method.Post, null, opt, (result) => {
2273
2277
  this.table.form.name = opt.name;
2274
- this.table.form.setButtons(this.table.form.onTop, true, this.row.Data.Id);
2275
2278
  this.table.form.setData(result);
2279
+ this.table.form.setButtons(this.table.form.onTop, true, this.row.Data.Id);
2276
2280
  this.table.form.inputs.filter(x => x.inEditDisabled).forEach(x => x.disabled = true);
2277
2281
  this.table.form.inputs.filter(x => !x.inEditVisible).forEach(x => x.visible = false);
2282
+ this.table.form.inputs.forEach(x => x.required = x.inEditRequired);
2278
2283
  if (this.table.modal) {
2279
2284
  this.table.modal.show();
2280
2285
  }
@@ -6480,6 +6485,7 @@ class TableClass {
6480
6485
  this.form.method = Method.Post;
6481
6486
  this.form.inputs.filter(x => x.inEditDisabled).forEach(x => x.disabled = false);
6482
6487
  this.form.inputs.filter(x => !x.inEditVisible).forEach(x => x.visible = true);
6488
+ this.form.inputs.forEach(x => x.required = x.baseRequired);
6483
6489
  this.modal.show();
6484
6490
  }
6485
6491
  set(changeRows = null) {