mirror of
https://github.com/fleetdm/fleet
synced 2026-04-21 21:47:20 +00:00
* hook up user and invite data together for data table * added client derived data to user table * hooked up action dropdown to table * hooked up edit modal and password reset * started adding editing user functiaonlity * add query params to /invite call * clean up editing teams * update select team from to handle existing users with teams * update closes modal now * reuse getUser to clean up code in userManagementpage * pass form data to updating user that is not the current User * add dynamic userform submit text and fix tests * fix lint error in table component * added empty state for user table * clean up unused data table props * added delete modal * add delete user functionality * add delete option for invite * Add styles for rows in user table and action dropdown cell * hook up user and invite data together for data table * added client derived data to user table * hooked up action dropdown to table * hooked up edit modal and password reset * started adding editing user functiaonlity * add query params to /invite call * clean up editing teams * update select team from to handle existing users with teams * update closes modal now * reuse getUser to clean up code in userManagementpage * pass form data to updating user that is not the current User * add dynamic userform submit text and fix tests * fix lint error in table component * added empty state for user table * clean up unused data table props * added delete modal * add delete user functionality * add delete option for invite * Merge in generateClassTag * Refactor table styles * Add newline to DropdownCell style sheet Co-authored-by: Gabriel Hernandez <ghernandez345@gmail.com> * update checking for admin through global_role in nav * added defaultGloablRole for creat user modal * remove unused comment * fix broken tests * reenabled search for users tests Co-authored-by: noahtalerman <47070608+noahtalerman@users.noreply.github.com>
31 lines
730 B
TypeScript
31 lines
730 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: any) => void;
|
|
}
|
|
|
|
const DropdownCell = (props: IDropdownCellProps): JSX.Element => {
|
|
const { options, onChange, placeholder } = props;
|
|
return (
|
|
<div className={baseClass}>
|
|
<Dropdown
|
|
onChange={onChange}
|
|
placeholder={placeholder}
|
|
searchable={false}
|
|
options={options}
|
|
/>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default DropdownCell;
|