mirror of
https://github.com/jeffvli/feishin.git
synced 2026-07-06 10:39:58 +02:00
Prevent double fetching when force refreshing paginated views (#1637)
* Prevent double fetching when force refreshing paginated views * remove await from infinite list loader query invalidation * add mutation and loading state to list refresh * add non-suspense query to list genre filters to add loading state * remove list count data set on random queries --------- Co-authored-by: jeffvli <jeffvictorli@gmail.com>
This commit is contained in:
@@ -2,9 +2,11 @@ import { useTranslation } from 'react-i18next';
|
||||
|
||||
import { ActionIcon, ActionIconProps } from '/@/shared/components/action-icon/action-icon';
|
||||
|
||||
interface RefreshButtonProps extends ActionIconProps {}
|
||||
interface RefreshButtonProps extends ActionIconProps {
|
||||
loading?: boolean;
|
||||
}
|
||||
|
||||
export const RefreshButton = ({ onClick, ...props }: RefreshButtonProps) => {
|
||||
export const RefreshButton = ({ loading, onClick, ...props }: RefreshButtonProps) => {
|
||||
const { t } = useTranslation();
|
||||
|
||||
return (
|
||||
@@ -14,6 +16,7 @@ export const RefreshButton = ({ onClick, ...props }: RefreshButtonProps) => {
|
||||
size: 'lg',
|
||||
...props.iconProps,
|
||||
}}
|
||||
loading={loading}
|
||||
onClick={onClick}
|
||||
tooltip={{
|
||||
label: t('common.refresh', { postProcess: 'sentenceCase' }),
|
||||
|
||||
Reference in New Issue
Block a user