Module: hooks/useURLLimit
Functions
useURLLimit
▸ useURLLimit(root0
): Object
Extracts limit of items per page from URL.
Parameters
Name | Type | Default value | Description |
---|---|---|---|
root0 | Object | undefined | Options. |
root0.defaultLimit? | number | 10 | Default limit of items per page. |
root0.validValues | number [] | undefined | Valid values of limit of items per page. If the value from URL is not valid, default value is used. |
Returns
Object
Limit of items per page from URL or default.
Name | Type |
---|---|
limit | number |
setLimit | (newValue : string | number ) => void |