Improve Table typing and remove annotations on callbacks (#2981)

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton authored and GitHub committed 2021-07-22 10:42:27 -04:00
1 parent c6a4d55d86
commit 64ac04186b
59 files changed
+487 -482

No files matched your search

@@ -83,14 +83,14 @@ export class HelmCharts extends Component<Props> {
store={helmChartStore}
isSelectable={false}
sortingCallbacks={{
[columnId.name]: (chart: HelmChart) => chart.getName(),
[columnId.repo]: (chart: HelmChart) => chart.getRepository(),
[columnId.name]: chart => chart.getName(),
[columnId.repo]: chart => chart.getRepository(),
}}
searchFilters={[
(chart: HelmChart) => chart.getName(),
(chart: HelmChart) => chart.getVersion(),
(chart: HelmChart) => chart.getAppVersion(),
(chart: HelmChart) => chart.getKeywords(),
chart => chart.getName(),
chart => chart.getVersion(),
chart => chart.getAppVersion(),
chart => chart.getKeywords(),
]}
customizeHeader={({ searchProps }) => ({
searchProps: {
@@ -106,7 +106,7 @@ export class HelmCharts extends Component<Props> {
{ title: "App Version", className: "app-version", id: columnId.appVersion },
{ title: "Repository", className: "repository", sortBy: columnId.repo, id: columnId.repo },
]}
renderTableContents={(chart: HelmChart) => [
renderTableContents={chart => [
<figure key="image">
<img
src={chart.getIcon() || require("./helm-placeholder.svg")}