@acorex/components 4.2.46 → 4.2.50

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.
@@ -10265,6 +10265,7 @@ class AXSearchBarComponent {
10265
10265
  this._filterItems.push({
10266
10266
  name: el.property.name,
10267
10267
  title: el.property.title,
10268
+ field: el.property.field,
10268
10269
  textValue: this._handleTextValue(el),
10269
10270
  value: el.value ? this._handleDefultVlaue(el) : null,
10270
10271
  component: el
@@ -10355,16 +10356,26 @@ class AXSearchBarComponent {
10355
10356
  }
10356
10357
  ngOnInit() { }
10357
10358
  _handleTextValue(dataItem) {
10358
- if (dataItem.value.length) {
10359
- let text = '';
10360
- dataItem.value.forEach((element, index) => {
10361
- text +=
10362
- index === dataItem.value.length - 1
10363
- ? element[dataItem.property.editorOptions.textField]
10364
- : element[dataItem.property.editorOptions.textField] + ',';
10365
- });
10359
+ let text = '';
10360
+ if (Array.isArray(dataItem.value)) {
10361
+ if (dataItem.value.length) {
10362
+ dataItem.value.forEach((element, index) => {
10363
+ text +=
10364
+ index === dataItem.value.length - 1
10365
+ ? element[dataItem.property.editorOptions.textField]
10366
+ : element[dataItem.property.editorOptions.textField] + ',';
10367
+ });
10368
+ }
10366
10369
  return text;
10367
10370
  }
10371
+ else if (dataItem.property.editorClass === 'ax/editors/date') {
10372
+ if (dataItem.value) {
10373
+ return new AXDateTime(dataItem.value, 'jalali').format('yyyy/MM/DD');
10374
+ }
10375
+ else {
10376
+ return;
10377
+ }
10378
+ }
10368
10379
  else {
10369
10380
  return;
10370
10381
  }
@@ -10404,14 +10415,15 @@ class AXSearchBarComponent {
10404
10415
  const findEl = this._filterItemsClone.find((el) => el.name == e.property.name);
10405
10416
  if (findEl) {
10406
10417
  findEl.value = value;
10407
- findEl.textValue = text ? text.toString() : null;
10418
+ findEl.textValue = e.property.editorClass === 'ax/editors/date' ? new AXDateTime(text, 'jalali').format('yyyy/MM/DD') : text.toString();
10408
10419
  }
10409
10420
  else if (e.value != null) {
10410
10421
  this._filterItemsClone.push({
10411
10422
  name: e.property.name,
10423
+ field: e.property.field,
10412
10424
  title: e.property.title,
10413
10425
  value,
10414
- textValue: text.toString(),
10426
+ textValue: e.property.editorClass === 'ax/editors/date' ? new AXDateTime(text, 'jalali').format('yyyy/MM/DD') : text.toString(),
10415
10427
  component: e,
10416
10428
  filterOptions: {
10417
10429
  filters: e.property?.filterOptions?.filters ? e.property.filterOptions.filters : [],