mirror of
https://github.com/docmost/docmost.git
synced 2025-11-17 03:51:09 +10:00
Implement space member search (#731)
* Hide pagination buttons if there is nothing to paginate * Create reusable hook for search and pagination
This commit is contained in:
@ -16,6 +16,10 @@ export default function Paginate({
|
||||
}: PagePaginationProps) {
|
||||
const { t } = useTranslation();
|
||||
|
||||
if (!hasPrevPage && !hasNextPage) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<Group mt="md">
|
||||
<Button
|
||||
|
||||
@ -24,10 +24,11 @@ export function SearchInput({
|
||||
}, [debouncedValue, onSearch]);
|
||||
|
||||
return (
|
||||
<Group mb="md">
|
||||
<Group mb="sm">
|
||||
<TextInput
|
||||
size="sm"
|
||||
placeholder={placeholder || t("Search...")}
|
||||
leftSection={<IconSearch size={14} />}
|
||||
leftSection={<IconSearch size={16} />}
|
||||
value={value}
|
||||
onChange={(e) => setValue(e.currentTarget.value)}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user