Skip to content

Commit

Permalink
update Ordered List & better keys values
Browse files Browse the repository at this point in the history
  • Loading branch information
thedannywahl committed Mar 1, 2024
1 parent 82380fb commit 250809a
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions isp-site/src/components/mdtoui.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,7 @@ const mdtoui = {
if (tasklist && children) {
let checked;
return (
<List.Item
key={child.toString()}
margin="0 0 small small"
{...liProps}
>
<List.Item key={child.key} margin="0 0 small small" {...liProps}>
{Children.map(children, (child) => {
if (child?.props?.type === "checkbox")
checked = child?.props?.checked ?? false;
Expand All @@ -141,7 +137,7 @@ const mdtoui = {
</List.Item>
);
}
return <List.Item key={child} {...child.props} />;
return <List.Item key={child.key} {...child.props} />;
})}
</List>
);
Expand All @@ -151,8 +147,8 @@ const mdtoui = {
const { children, ...fProps } = props;
return (
<List as={node.tagName} {...fProps}>
{children.map((node, i) => {
return <List.Item key={i.toString()} {...node.props} />;
{Children.map(children, (child) => {
return <List.Item key={child.key} {...child.props} />;
})}
</List>
);
Expand Down Expand Up @@ -189,8 +185,8 @@ const mdtoui = {
{Children.map(children, (child) => {
return (
<Table.ColHeader
key={child.toString()}
id={child.toString()}
key={child.key}
id={child.key}
{...child.props}
/>
);
Expand Down

0 comments on commit 250809a

Please sign in to comment.