Merge pull request #1323 from scm-manager/feature/namespace_resource

Feature filter by namespace
This commit is contained in:
Sebastian Sdorra
2020-09-10 11:52:11 +02:00
committed by GitHub
47 changed files with 1017 additions and 107 deletions

View File

@@ -23,6 +23,7 @@
*/
import React, { ChangeEvent } from "react";
import classNames from "classnames";
import styled from "styled-components";
type Props = {
options: string[];
@@ -33,6 +34,10 @@ type Props = {
disabled?: boolean;
};
const FullWidthSelect = styled.select`
width: 100%;
`;
class DropDown extends React.Component<Props> {
render() {
const { options, optionValues, preselectedOption, className, disabled } = this.props;
@@ -43,7 +48,7 @@ class DropDown extends React.Component<Props> {
return (
<div className={classNames(className, "select", disabled ? "disabled" : "")}>
<select value={preselectedOption ? preselectedOption : ""} onChange={this.change} disabled={disabled}>
<FullWidthSelect value={preselectedOption ? preselectedOption : ""} onChange={this.change} disabled={disabled}>
{options.map((option, index) => {
const value = optionValues && optionValues[index] ? optionValues[index] : option;
return (
@@ -52,7 +57,7 @@ class DropDown extends React.Component<Props> {
</option>
);
})}
</select>
</FullWidthSelect>
</div>
);
}