Skip to content

Commit

Permalink
Code review: Matheus
Browse files Browse the repository at this point in the history
  • Loading branch information
flaviendelangle committed Mar 31, 2022
1 parent a5765e7 commit 250690b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions docs/data/data-grid/state/RestoreStateApiRef.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,10 @@ const DEMO_INITIAL_STATE = {
};

const ViewListItem = (props) => {
const { view, viewId, selected, onDelete, onSelect } = props;
const { view, viewId, selected, onDelete, onSelect, ...other } = props;

return (
<MenuItem selected={selected} onClick={() => onSelect(viewId)}>
<MenuItem selected={selected} onClick={() => onSelect(viewId)} {...other}>
{view.label}
<IconButton
edge="end"
Expand Down Expand Up @@ -309,7 +309,6 @@ const CustomToolbar = () => {
anchorEl={state.menuAnchorEl}
role={undefined}
transition
disablePortal
placement="bottom-start"
>
{({ TransitionProps }) => (
Expand Down
5 changes: 2 additions & 3 deletions docs/data/data-grid/state/RestoreStateApiRef.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,10 @@ const ViewListItem = (props: {
onDelete: (viewId: string) => void;
onSelect: (viewId: string) => void;
}) => {
const { view, viewId, selected, onDelete, onSelect } = props;
const { view, viewId, selected, onDelete, onSelect, ...other } = props;

return (
<MenuItem selected={selected} onClick={() => onSelect(viewId)}>
<MenuItem selected={selected} onClick={() => onSelect(viewId)} {...other}>
{view.label}
<IconButton
edge="end"
Expand Down Expand Up @@ -290,7 +290,6 @@ const CustomToolbar = () => {
anchorEl={state.menuAnchorEl}
role={undefined}
transition
disablePortal
placement="bottom-start"
>
{({ TransitionProps }) => (
Expand Down

0 comments on commit 250690b

Please sign in to comment.