Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix pagination issue in ExtensibleTableComponent #19203

Merged
merged 5 commits into from
Mar 5, 2024
Merged

Conversation

Sinan997
Copy link
Contributor

@Sinan997 Sinan997 commented Mar 4, 2024

Resolves #19194

Edited by @masumulu28

@oykuermann this PR is important for all datagrid, can you please make detailed test thank you

@Sinan997 Sinan997 added this to the 8.0-patch milestone Mar 4, 2024
@Sinan997 Sinan997 requested a review from masum-ulu March 4, 2024 16:11
@Sinan997 Sinan997 closed this Mar 5, 2024
@Sinan997 Sinan997 reopened this Mar 5, 2024
@oykuermann oykuermann merged commit ad9b702 into rel-8.0 Mar 5, 2024
2 of 3 checks passed
@oykuermann oykuermann deleted the issue-19194 branch March 5, 2024 11:10
Comment on lines -56 to -63
private subscribeToPage() {
const sub = this.table.page.subscribe(({ offset }) => {
this.list.page = offset;
this.table.offset = offset;
});
this.subscription.add(sub);
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change causing broken pagination now. Whether the _filter is empty or not, pagination does not work on the ngx-datatable component.

Reproduce

Just try to paginate any ngx-datatable that works with [list], and nothing happens.

@Sinan997 @oykuermann

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have moved pagination functionality to ngx-datatable's input, output.
https://github.com/abpframework/abp/pull/19203/files#diff-0c5913f6f68aa1645a0b5aa522f62c0b7e5f48657e8398c2f625926b138f847dR6-R7

So if you are using ngx-datatable directly. You should add the code below to your ngx-datatable element

[offset]="list?.page"
(page)="list.page = $event.offset"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think a patch version (8.0.x) should not contain a breaking change. I'm sure you can find a way that supports both.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you are right. It's a breaking change. I didn't realise that people uses ngx-datatable directly.

Thanks for your attention.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants