mirror of
https://github.com/umami-software/umami.git
synced 2026-02-08 06:37:18 +01:00
Fix Select component usage by removing items prop and render functions.
Replace render function children with mapped ListItem elements and remove the unsupported items prop across all Select instances. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
1b347531dc
commit
28c9c7d3ec
7 changed files with 17 additions and 19 deletions
|
|
@ -54,7 +54,6 @@ export function WebsiteSelect({
|
|||
return (
|
||||
<Select
|
||||
{...props}
|
||||
items={listItems}
|
||||
value={websiteId}
|
||||
isLoading={isLoading}
|
||||
allowSearch={true}
|
||||
|
|
@ -65,10 +64,14 @@ export function WebsiteSelect({
|
|||
renderValue={renderValue}
|
||||
listProps={{
|
||||
renderEmptyState: () => <Empty message={formatMessage(messages.noResultsFound)} />,
|
||||
style: { maxHeight: 'calc(42vh - 65px)' },
|
||||
style: { maxHeight: 'calc(42vh - 65px)', width: 280 },
|
||||
}}
|
||||
>
|
||||
{({ id, name }: any) => <ListItem key={id}>{name}</ListItem>}
|
||||
{listItems.map(({ id, name }) => (
|
||||
<ListItem key={id} id={id}>
|
||||
{name}
|
||||
</ListItem>
|
||||
))}
|
||||
</Select>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue