-
Notifications
You must be signed in to change notification settings - Fork 2
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: covering pagination buttons into 'a' tag #23
Conversation
Preview is ready. |
className={b('item', mods)} | ||
onClick={() => onClick?.(itemKey)} | ||
loading={loading && Boolean(mods.active)} | ||
<a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
using an tag this way will reload an app every time we click on a paginator button. We need to be able eigther configure an tag we use or develop a way to prevent reloading
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it cannot be like this. we use event.preventDefault() on click an tag. App should be not reloaded
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it. Issue resolved
you need to rebase from main, because your branch have old dependencies, for example https://github.com/gravity-ui/blog-constructor/blob/fix/cover_pagination_into_a_tag/package.json#L82 |
…gravity-ui/blog-constructor into fix/cover_pagination_into_a_tag
…gravity-ui/blog-constructor into fix/cover_pagination_into_a_tag
@@ -33,6 +35,9 @@ export const Paginator = ({ | |||
getPagesCount({itemsPerPage, totalItems, maxPages}), | |||
); | |||
|
|||
const {locale} = useContext(LocaleContext); | |||
const blogPath = getBlogPath(locale?.pathPrefix || ''); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now the logic of creating an url is divided into two components. Maybe we should put this code in the Pagination Item ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, I will do it
No description provided.