Skip to content

Commit

Permalink
fix: console errors
Browse files Browse the repository at this point in the history
  • Loading branch information
danielstefanequilobe committed Feb 7, 2022
1 parent cc360da commit f1485da
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 14 deletions.
8 changes: 4 additions & 4 deletions src/components/blocks/APIDataTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ const APIDataTable = withTheme(({ headings, data, actions }) => {
<tr>
{headings.map((heading, index) => (
<Th
start={index === 0}
end={!actions && index === headings.length - 1}
start={index === 0 ? 1 : 0}
end={!actions && index === headings.length - 1 ? 1 : 0}
selectedTheme={theme}
key={index}
>
Expand All @@ -151,8 +151,8 @@ const APIDataTable = withTheme(({ headings, data, actions }) => {
))}
{actions && (
<Th
start={false}
end={true}
start={0}
end={1}
selectedTheme={theme}
key={'action'}
></Th>
Expand Down
26 changes: 16 additions & 10 deletions src/components/blocks/DataTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,21 +150,23 @@ const DataTable = withTheme(({ headings, data, actions }) => {
<tr>
{headings.map((heading, index) => (
<Th
start={index === 0}
end={!actions && index === headings.length - 1}
start={index === 0 ? 1 : 0}
end={!actions && index === headings.length - 1 ? 1 : 0}
selectedTheme={appStore.theme}
key={index}>
key={index}
>
<TableCellHeaderText>
{convertPascalCaseToSentenceCase(heading)}
</TableCellHeaderText>
</Th>
))}
{actions && (
<Th
start={false}
end={true}
start={0}
end={1}
selectedTheme={appStore.theme}
key={'action'}>
key={'action'}
>
<TableCellHeaderText>Action</TableCellHeaderText>
</Th>
)}
Expand All @@ -178,9 +180,11 @@ const DataTable = withTheme(({ headings, data, actions }) => {
<Td
onClick={() => setRecord(record)}
selectedTheme={appStore.theme}
key={index}>
key={index}
>
<TableCellText
tooltip={record[key] && record[key].toString()}>
tooltip={record[key] && record[key].toString()}
>
{record[key] && record[key].toString()}
</TableCellText>
</Td>
Expand All @@ -193,7 +197,8 @@ const DataTable = withTheme(({ headings, data, actions }) => {
setEditUnits(true);
setEditRecord(record);
}}
selectedTheme={appStore.theme}>
selectedTheme={appStore.theme}
>
<BasicMenu />
</Td>
)}
Expand All @@ -204,7 +209,8 @@ const DataTable = withTheme(({ headings, data, actions }) => {
setEditProjects(true);
setEditRecord(record);
}}
selectedTheme={appStore.theme}>
selectedTheme={appStore.theme}
>
<BasicMenu />
</Td>
)}
Expand Down

0 comments on commit f1485da

Please sign in to comment.