refactor(Menu): Use items prop instead of deprecated Menu.Item HOC (#32587)

This commit is contained in:
Mehmet Salih Yavuz
2025-06-16 22:51:27 +03:00
committed by GitHub
parent 527c8de773
commit d15b0e4f6d
23 changed files with 849 additions and 729 deletions

View File

@@ -48,14 +48,13 @@ function renderQueryLimit(
limitDropdown.push(maxRow);
return (
<Menu>
{[...new Set(limitDropdown)].map(limit => (
<Menu.Item key={`${limit}`} onClick={() => setQueryLimit(limit)}>
{/* // eslint-disable-line no-use-before-define */}
{convertToNumWithSpaces(limit)}{' '}
</Menu.Item>
))}
</Menu>
<Menu
items={[...new Set(limitDropdown)].map(limit => ({
key: `${limit}`,
onClick: () => setQueryLimit(limit),
label: `${convertToNumWithSpaces(limit)} `,
}))}
/>
);
}