mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 15:59:41 +02:00
refactor(app): placement form section [EE-6386] (#10818)
Some checks are pending
ci / build_images (map[arch:amd64 platform:linux]) (push) Waiting to run
ci / build_images (map[arch:amd64 platform:windows version:1809]) (push) Waiting to run
ci / build_images (map[arch:amd64 platform:windows version:ltsc2022]) (push) Waiting to run
ci / build_images (map[arch:arm64 platform:linux]) (push) Waiting to run
ci / build_manifests (push) Blocked by required conditions
/ triage (push) Waiting to run
Lint / Run linters (push) Waiting to run
Test / test-client (push) Waiting to run
Test / test-server (map[arch:amd64 platform:linux]) (push) Waiting to run
Test / test-server (map[arch:amd64 platform:windows version:1809]) (push) Waiting to run
Test / test-server (map[arch:amd64 platform:windows version:ltsc2022]) (push) Waiting to run
Test / test-server (map[arch:arm64 platform:linux]) (push) Waiting to run
Some checks are pending
ci / build_images (map[arch:amd64 platform:linux]) (push) Waiting to run
ci / build_images (map[arch:amd64 platform:windows version:1809]) (push) Waiting to run
ci / build_images (map[arch:amd64 platform:windows version:ltsc2022]) (push) Waiting to run
ci / build_images (map[arch:arm64 platform:linux]) (push) Waiting to run
ci / build_manifests (push) Blocked by required conditions
/ triage (push) Waiting to run
Lint / Run linters (push) Waiting to run
Test / test-client (push) Waiting to run
Test / test-server (map[arch:amd64 platform:linux]) (push) Waiting to run
Test / test-server (map[arch:amd64 platform:windows version:1809]) (push) Waiting to run
Test / test-server (map[arch:amd64 platform:windows version:ltsc2022]) (push) Waiting to run
Test / test-server (map[arch:arm64 platform:linux]) (push) Waiting to run
Co-authored-by: testa113 <testa113>
This commit is contained in:
parent
2d77e71085
commit
9fc7187e24
16 changed files with 349 additions and 220 deletions
|
@ -188,6 +188,7 @@ export function InputList<T = DefaultType>({
|
|||
initialItemsCount={initialItemsCount.current}
|
||||
handleRemoveItem={handleRemoveItem}
|
||||
handleToggleNeedsDeletion={handleToggleNeedsDeletion}
|
||||
dataCy={`${deleteButtonDataCy}_${index}`}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
|
@ -325,6 +326,7 @@ type CanUndoDeleteButtonProps<T> = {
|
|||
initialItemsCount: number;
|
||||
handleRemoveItem(key: Key, item: T): void;
|
||||
handleToggleNeedsDeletion(key: Key, item: T): void;
|
||||
dataCy: string;
|
||||
};
|
||||
|
||||
function CanUndoDeleteButton<T>({
|
||||
|
@ -333,6 +335,7 @@ function CanUndoDeleteButton<T>({
|
|||
initialItemsCount,
|
||||
handleRemoveItem,
|
||||
handleToggleNeedsDeletion,
|
||||
dataCy,
|
||||
}: CanUndoDeleteButtonProps<T>) {
|
||||
return (
|
||||
<div className="items-start">
|
||||
|
@ -343,6 +346,7 @@ function CanUndoDeleteButton<T>({
|
|||
onClick={handleDeleteClick}
|
||||
className="vertical-center btn-only-icon"
|
||||
icon={Trash2}
|
||||
data-cy={`${dataCy}_delete`}
|
||||
/>
|
||||
)}
|
||||
{item.needsDeletion && (
|
||||
|
@ -352,6 +356,7 @@ function CanUndoDeleteButton<T>({
|
|||
onClick={handleDeleteClick}
|
||||
className="vertical-center btn-only-icon"
|
||||
icon={RotateCw}
|
||||
data-cy={`${dataCy}_undo_delete`}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue