From 15a9a5b09b2a277c54820dc97ef3b2c180ff9ab8 Mon Sep 17 00:00:00 2001 From: Eduard Heimbuch Date: Wed, 8 Jan 2020 12:38:21 +0100 Subject: [PATCH] fix links and routes --- scm-ui/ui-components/src/CardColumn.tsx | 2 +- scm-ui/ui-components/src/forms/DropDown.tsx | 7 ++++++- scm-ui/ui-components/src/repos/changesets/changesets.ts | 2 +- .../src/repos/codeSection/components/CodeViewSwitcher.tsx | 4 ++-- .../src/repos/codeSection/containers/CodeOverview.tsx | 2 +- .../src/repos/components/list/RepositoryEntry.tsx | 4 ++-- 6 files changed, 13 insertions(+), 8 deletions(-) diff --git a/scm-ui/ui-components/src/CardColumn.tsx b/scm-ui/ui-components/src/CardColumn.tsx index fd84b9b11e..f7e7570d1d 100644 --- a/scm-ui/ui-components/src/CardColumn.tsx +++ b/scm-ui/ui-components/src/CardColumn.tsx @@ -5,7 +5,7 @@ import { Link } from "react-router-dom"; type Props = { title: string; - description: string; + description?: string; avatar: ReactNode; contentRight?: ReactNode; footerLeft: ReactNode; diff --git a/scm-ui/ui-components/src/forms/DropDown.tsx b/scm-ui/ui-components/src/forms/DropDown.tsx index b65c48b49d..97b31d4413 100644 --- a/scm-ui/ui-components/src/forms/DropDown.tsx +++ b/scm-ui/ui-components/src/forms/DropDown.tsx @@ -13,10 +13,15 @@ type Props = { class DropDown extends React.Component { render() { const { options, optionValues, preselectedOption, className, disabled } = this.props; + + if (preselectedOption && !options.includes(preselectedOption)) { + options.unshift(preselectedOption) + } + return (