mirror of
https://github.com/portainer/portainer.git
synced 2025-08-02 20:35:25 +02:00
refactor(users): migrate list view to react [EE-2202] (#11914)
This commit is contained in:
parent
33ce841040
commit
3c1441d462
43 changed files with 967 additions and 681 deletions
|
@ -5,7 +5,7 @@ import { PortainerSelect } from '@@/form-components/PortainerSelect';
|
|||
interface Props {
|
||||
name?: string;
|
||||
value: TeamId[] | readonly TeamId[];
|
||||
onChange(value: readonly TeamId[]): void;
|
||||
onChange(value: TeamId[]): void;
|
||||
teams: Team[];
|
||||
dataCy: string;
|
||||
inputId?: string;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { PropsWithChildren } from 'react';
|
||||
import { ComponentProps, PropsWithChildren } from 'react';
|
||||
|
||||
import { AutomationTestingProps } from '@/types';
|
||||
|
||||
|
@ -12,6 +12,7 @@ interface Props extends AutomationTestingProps {
|
|||
isLoading: boolean;
|
||||
isValid: boolean;
|
||||
errors?: unknown;
|
||||
submitIcon?: ComponentProps<typeof LoadingButton>['icon'];
|
||||
}
|
||||
|
||||
export function FormActions({
|
||||
|
@ -21,6 +22,7 @@ export function FormActions({
|
|||
children,
|
||||
isValid,
|
||||
errors,
|
||||
submitIcon,
|
||||
'data-cy': dataCy,
|
||||
}: PropsWithChildren<Props>) {
|
||||
return (
|
||||
|
@ -34,6 +36,7 @@ export function FormActions({
|
|||
isLoading={isLoading}
|
||||
disabled={!isValid}
|
||||
data-cy={dataCy}
|
||||
icon={submitIcon}
|
||||
>
|
||||
{submitLabel}
|
||||
</LoadingButton>
|
||||
|
|
|
@ -36,7 +36,7 @@ interface SharedProps
|
|||
|
||||
interface MultiProps<TValue> extends SharedProps {
|
||||
value: readonly TValue[];
|
||||
onChange(value: readonly TValue[]): void;
|
||||
onChange(value: TValue[]): void;
|
||||
options: Options<TValue>;
|
||||
isMulti: true;
|
||||
components?: SelectComponentsConfig<
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue