Skip to content

Commit

Permalink
Substituted null with undefined for default rowStyle value in SimpleList
Browse files Browse the repository at this point in the history
  • Loading branch information
ValentinnDimitroff committed Oct 7, 2020
1 parent 99d828f commit 281bb0f
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions packages/ra-ui-materialui/src/list/SimpleList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,11 @@ const SimpleList: FC<SimpleListProps> = props => {
>
<ListItem
button={!!linkType as any}
style={rowStyle ? rowStyle(data[id], rowIndex) : null}
style={
rowStyle
? rowStyle(data[id], rowIndex)
: undefined
}
>
{leftIcon && (
<ListItemIcon>
Expand Down Expand Up @@ -190,7 +194,7 @@ export interface SimpleListProps extends Omit<ListProps, 'classes'> {
rightIcon?: FunctionToElement;
secondaryText?: FunctionToElement;
tertiaryText?: FunctionToElement;
rowStyle?: (record: Record, index: number) => any;
rowStyle?: (record: Record, index: number) => any;
}

const useLinkOrNotStyles = makeStyles(
Expand Down Expand Up @@ -227,8 +231,8 @@ const LinkOrNot: FC<LinkOrNotProps> = ({
{children}
</Link>
) : (
<span>{children}</span>
);
<span>{children}</span>
);
};

export type FunctionLinkType = (record: Record, id: Identifier) => string;
Expand Down

0 comments on commit 281bb0f

Please sign in to comment.