mirror of
https://github.com/umami-software/umami.git
synced 2025-12-08 05:12:36 +01:00
fix websiteselect search
This commit is contained in:
parent
089b4fee69
commit
575c50cdfe
1 changed files with 3 additions and 3 deletions
|
|
@ -14,12 +14,12 @@ export function WebsiteSelect({
|
||||||
onSelect?: (key: any) => void;
|
onSelect?: (key: any) => void;
|
||||||
}) {
|
}) {
|
||||||
const { formatMessage, labels, messages } = useMessages();
|
const { formatMessage, labels, messages } = useMessages();
|
||||||
const [query, setQuery] = useState('');
|
const [search, setSearch] = useState('');
|
||||||
const [selectedId, setSelectedId] = useState<Key>(websiteId);
|
const [selectedId, setSelectedId] = useState<Key>(websiteId);
|
||||||
|
|
||||||
const { data: website } = useWebsite(selectedId as string);
|
const { data: website } = useWebsite(selectedId as string);
|
||||||
|
|
||||||
const queryResult = useWebsites({ teamId }, { query, pageSize: 5 });
|
const queryResult = useWebsites({ teamId }, { search });
|
||||||
|
|
||||||
const renderValue = () => {
|
const renderValue = () => {
|
||||||
return website?.name;
|
return website?.name;
|
||||||
|
|
@ -35,7 +35,7 @@ export function WebsiteSelect({
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleSearch = (value: string) => {
|
const handleSearch = (value: string) => {
|
||||||
setQuery(value);
|
setSearch(value);
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue