feat: update start/stop pagination mode
This commit is contained in:
@@ -28,8 +28,14 @@ export const ActionProvider = ({ children }: { children: ReactNode }) => {
|
|||||||
const [paginationMode, setPaginationMode] = useState<boolean>(false);
|
const [paginationMode, setPaginationMode] = useState<boolean>(false);
|
||||||
const [paginationType, setPaginationType] = useState<PaginationType>('');
|
const [paginationType, setPaginationType] = useState<PaginationType>('');
|
||||||
|
|
||||||
const startPaginationMode = () => setPaginationMode(true);
|
const startPaginationMode = (type: PaginationType) => {
|
||||||
const stopPaginationMode = () => setPaginationMode(false);
|
setPaginationMode(true);
|
||||||
|
setPaginationType(type);
|
||||||
|
};
|
||||||
|
const stopPaginationMode = () => {
|
||||||
|
setPaginationMode(false);
|
||||||
|
setPaginationType('');
|
||||||
|
};
|
||||||
|
|
||||||
const startGetText = () => setGetText(true);
|
const startGetText = () => setGetText(true);
|
||||||
const stopGetText = () => setGetText(false);
|
const stopGetText = () => setGetText(false);
|
||||||
|
|||||||
Reference in New Issue
Block a user