mirror of
https://github.com/fleetdm/fleet
synced 2026-05-04 05:48:26 +00:00
> 📜 Related issue: https://github.com/fleetdm/fleet/issues/14500 # Checklist for submitter If some of the following don't apply, delete the relevant line. <!-- Note that API documentation changes are now addressed by the product design team. --> - [x] Changes file added for user-visible changes in `changes/` or `orbit/changes/`. See [Changes files](https://fleetdm.com/docs/contributing/committing-changes#changes-files) for more information. - [x] Added/updated tests - [x] Manual QA for all new/changed functionality
37 lines
788 B
TypeScript
37 lines
788 B
TypeScript
import React from "react";
|
|
|
|
// ignore TS error for now until these are rewritten in ts.
|
|
// @ts-ignore
|
|
import Dropdown from "components/forms/fields/Dropdown";
|
|
|
|
import { IDropdownOption } from "interfaces/dropdownOption";
|
|
|
|
const baseClass = "dropdown-cell";
|
|
|
|
interface IDropdownCellProps {
|
|
options: IDropdownOption[];
|
|
placeholder: string;
|
|
onChange: (value: string) => void;
|
|
disabled?: boolean;
|
|
}
|
|
|
|
const DropdownCell = ({
|
|
options,
|
|
placeholder,
|
|
onChange,
|
|
disabled,
|
|
}: IDropdownCellProps): JSX.Element => {
|
|
return (
|
|
<div className={baseClass}>
|
|
<Dropdown
|
|
onChange={onChange}
|
|
placeholder={placeholder}
|
|
searchable={false}
|
|
options={options}
|
|
disabled={disabled ?? false}
|
|
/>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default DropdownCell;
|