-
Notifications
You must be signed in to change notification settings - Fork 18
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
Добавить пагинацию #102
Labels
Milestone
Comments
Ресурсы
cache: new InMemoryCache({
typePolicies: {
Query: {
fields: {
search: relayStylePagination(),
},
},
},
}), const { data, loading, fetchMore, error, refetch } = useSearchQuery({
variables: {
type: searchTypeEnum,
query: searchQuery,
},
errorPolicy: "all",
notifyOnNetworkStatusChange: true,
});
...
useEffect(() => {
refetch({
type: searchTypeEnum,
query: searchQuery,
});
/* eslint-disable-next-line react-hooks/exhaustive-deps */
}, [searchTypeEnum]);
if (error) {
console.error(`#${data?.search.pageInfo.startCursor}`, error);
}
...
<div className="search-results__pages">
<button
onClick={() => {
fetchMore({
variables: {
cursor: data?.search.pageInfo.endCursor,
},
});
}}
>
Fetch more
</button>
</div> query Search($query: String!, $type: SearchType!, $cursor: String) {
search(query: $query, type: $type, first: 10, after: $cursor) {
pageInfo {
endCursor
startCursor
hasNextPage
hasPreviousPage
}
edges {
node {
...RepoFields
...UserFields
}
}
} |
This was referenced Nov 22, 2020
Closed
Merged
azinit
added a commit
that referenced
this issue
Nov 25, 2020
azinit
added a commit
that referenced
this issue
Nov 25, 2020
azinit
added a commit
that referenced
this issue
Nov 25, 2020
azinit
added a commit
that referenced
this issue
Nov 25, 2020
azinit
added a commit
that referenced
this issue
Nov 25, 2020
azinit
added a commit
that referenced
this issue
Nov 25, 2020
azinit
added a commit
that referenced
this issue
Nov 25, 2020
azinit
added a commit
that referenced
this issue
Nov 25, 2020
azinit
added a commit
that referenced
this issue
Nov 25, 2020
azinit
added a commit
that referenced
this issue
Nov 25, 2020
Feature/pagination search - (#102) Добавление пагинации на странице поиска + легкий рефакторинг 
azinit
added a commit
that referenced
this issue
Nov 25, 2020
azinit
added a commit
that referenced
this issue
Nov 25, 2020
azinit
added a commit
that referenced
this issue
Nov 25, 2020
azinit
added a commit
that referenced
this issue
Nov 25, 2020
azinit
added a commit
that referenced
this issue
Nov 25, 2020
azinit
added a commit
that referenced
this issue
Nov 25, 2020
azinit
added a commit
that referenced
this issue
Nov 25, 2020
Feature/pagination repo list ## ДИСКЛЕЙМЕР Да, в github такая же долбанутая пагинация, но зато было откуда брать пример Да и поддерживаемость ссылок надо было поддерживать между сайтами ## CHANGELOG - (#102) Добавление пагинации для страницы пользователя (Список репозиториев) - (#134) Добавлен лейбл с кол-вом элементов для repo-list 
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The text was updated successfully, but these errors were encountered: