@decaf-ts/for-angular 0.1.16 → 0.1.17
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.
|
@@ -3893,11 +3893,15 @@ class NgxRepositoryDirective extends DecafComponent {
|
|
|
3893
3893
|
if (!condition) {
|
|
3894
3894
|
condition = this.buildCondition();
|
|
3895
3895
|
}
|
|
3896
|
+
// !! use where condition will make paginator ignores sortBy and col name
|
|
3896
3897
|
return await this.repository
|
|
3897
3898
|
.select()
|
|
3898
|
-
.
|
|
3899
|
-
.orderBy([(this.sortBy || this.pk), sortDirection])
|
|
3899
|
+
.orderBy((this.sortBy || this.pk), sortDirection)
|
|
3900
3900
|
.paginate(limit);
|
|
3901
|
+
// .select()
|
|
3902
|
+
// .where(condition)
|
|
3903
|
+
// .orderBy([(this.sortBy || this.pk) as keyof M, sortDirection])
|
|
3904
|
+
// .paginate(limit);
|
|
3901
3905
|
}
|
|
3902
3906
|
async transactionBegin(data, repository, operation) {
|
|
3903
3907
|
try {
|
|
@@ -5671,7 +5675,7 @@ class NgxModelPageDirective extends NgxPageDirective {
|
|
|
5671
5675
|
if (result?.[this.pk]) {
|
|
5672
5676
|
this.modelId = result[this.pk];
|
|
5673
5677
|
}
|
|
5674
|
-
if (redirect) {
|
|
5678
|
+
if (redirect && !isModalChild) {
|
|
5675
5679
|
this.location.back();
|
|
5676
5680
|
}
|
|
5677
5681
|
}
|
|
@@ -5799,6 +5803,7 @@ class NgxRenderableComponentDirective extends NgxModelPageDirective {
|
|
|
5799
5803
|
component = this?.output?.component;
|
|
5800
5804
|
if (!this.instance && component)
|
|
5801
5805
|
this.instance = component;
|
|
5806
|
+
const isModalChild = this.instance?.['isModalChild'] ?? false;
|
|
5802
5807
|
if (this.instance && component) {
|
|
5803
5808
|
const componentKeys = Object.keys(this.instance);
|
|
5804
5809
|
for (const key of componentKeys) {
|
|
@@ -5810,6 +5815,7 @@ class NgxRenderableComponentDirective extends NgxModelPageDirective {
|
|
|
5810
5815
|
await this.handleEvent({
|
|
5811
5816
|
component: component.name || '',
|
|
5812
5817
|
name: key,
|
|
5818
|
+
isModalChild,
|
|
5813
5819
|
...event,
|
|
5814
5820
|
});
|
|
5815
5821
|
});
|