Skip to content

Commit 281bb0f

Browse files
Substituted null with undefined for default rowStyle value in SimpleList
1 parent 99d828f commit 281bb0f

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

packages/ra-ui-materialui/src/list/SimpleList.tsx

+8-4
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,11 @@ const SimpleList: FC<SimpleListProps> = props => {
106106
>
107107
<ListItem
108108
button={!!linkType as any}
109-
style={rowStyle ? rowStyle(data[id], rowIndex) : null}
109+
style={
110+
rowStyle
111+
? rowStyle(data[id], rowIndex)
112+
: undefined
113+
}
110114
>
111115
{leftIcon && (
112116
<ListItemIcon>
@@ -190,7 +194,7 @@ export interface SimpleListProps extends Omit<ListProps, 'classes'> {
190194
rightIcon?: FunctionToElement;
191195
secondaryText?: FunctionToElement;
192196
tertiaryText?: FunctionToElement;
193-
rowStyle?: (record: Record, index: number) => any;
197+
rowStyle?: (record: Record, index: number) => any;
194198
}
195199

196200
const useLinkOrNotStyles = makeStyles(
@@ -227,8 +231,8 @@ const LinkOrNot: FC<LinkOrNotProps> = ({
227231
{children}
228232
</Link>
229233
) : (
230-
<span>{children}</span>
231-
);
234+
<span>{children}</span>
235+
);
232236
};
233237

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

0 commit comments

Comments
 (0)