Fix parseAPI not working with non-"namespaces" pathnames. (#450)

* fix parseApi not accepting versions that don't start with 'v'
* add unit tests

Signed-off-by: Sebastian Malton <smalton@mirantis.com>
Co-authored-by: Sebastian Malton <smalton@mirantis.com>
This commit is contained in:
Sebastian MaltonandSebastian Malton authored and GitHub committed 2020-06-16 10:51:39 -04:00
1 parent 0661954a27
commit bce7aec87d
10 files changed
+182 -37

No files matched your search

@@ -10,7 +10,7 @@ import ReactSelect, { components as ReactSelectComponents } from "react-select"
import { Props as ReactSelectProps } from "react-select/base"
import Creatable, { CreatableProps } from "react-select/creatable"
import { StylesConfig } from "react-select/src/styles"
import { ActionMeta } from "react-select/src/types"
import { ActionMeta, OptionTypeBase } from "react-select/src/types"
import { themeStore } from "../../theme.store";
export { ReactSelectComponents }
@@ -31,7 +31,7 @@ export interface SelectProps<T = any> extends ReactSelectProps<T>, CreatableProp
menuClass?: string;
isCreatable?: boolean;
autoConvertOptions?: boolean; // to internal format (i.e. {value: T, label: string}[]), not working with groups
onChange?(option: T, meta?: ActionMeta): void;
onChange?(option: T, meta?: ActionMeta<OptionTypeBase>): void;
}
@observer
@@ -76,7 +76,7 @@ export class Select extends React.Component<SelectProps> {
}
@autobind()
onChange(value: SelectOption, meta: ActionMeta) {
onChange(value: SelectOption, meta: ActionMeta<OptionTypeBase>) {
if (this.props.onChange) {
this.props.onChange(value, meta);
}