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

bugfix: save the number of pages loaded #1254

Merged
merged 1 commit into from
Jul 27, 2023
Merged

Conversation

lauramargar
Copy link
Contributor

@lauramargar lauramargar commented Jul 27, 2023

Motivation and context

The scroll was not kept when you loaded a page greater than 1. It happens when you don't have a filter and also when you select any. We have solved the problem setting a configuration on the set-url-params.actions.ts in the search module.

  • Dependencies. If any, specify:
  • Open issue. If applicable, link: EMP-1017

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that causes existing functionality to not work as expected)
  • Change requires a documentation update

What is the destination branch of this PR?

  • Main
  • Other. Specify:

How has this been tested?

Add this code to the adapter.ts file in the views folder:

resultSchema.$override<any, Partial>({
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
id: ({ id }) => id.toString()
});

Then scroll to different pages and reload the page. The scroll should be kept.

@lauramargar lauramargar requested a review from a team as a code owner July 27, 2023 10:29
@lauramargar lauramargar merged commit fae7903 into main Jul 27, 2023
4 checks passed
@lauramargar lauramargar deleted the bugfix/scroll-is-not-kept branch July 27, 2023 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants