mirror of
https://github.com/apache/superset.git
synced 2026-07-18 20:55:47 +00:00
refactor(Menu): Use items prop instead of deprecated Menu.Item HOC (#32587)
This commit is contained in:
committed by
GitHub
parent
527c8de773
commit
d15b0e4f6d
@@ -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)} `,
|
||||
}))}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user