mirror of
https://github.com/portainer/portainer.git
synced 2025-07-22 14:59:41 +02:00
refactor(containers): migrate create view to react [EE-2307] (#9175)
This commit is contained in:
parent
bc0050a7b4
commit
d970f0e2bc
71 changed files with 2612 additions and 1399 deletions
|
@ -1,5 +1,3 @@
|
|||
import { useState } from 'react';
|
||||
|
||||
import { InputList } from '@@/form-components/InputList';
|
||||
import { ArrayError } from '@@/form-components/InputList/InputList';
|
||||
|
||||
|
@ -7,7 +5,7 @@ import { Item } from './Item';
|
|||
import { Values } from './types';
|
||||
|
||||
export function LabelsTab({
|
||||
values: initialValues,
|
||||
values,
|
||||
onChange,
|
||||
errors,
|
||||
}: {
|
||||
|
@ -15,8 +13,6 @@ export function LabelsTab({
|
|||
onChange: (values: Values) => void;
|
||||
errors?: ArrayError<Values>;
|
||||
}) {
|
||||
const [values, setControlledValues] = useState(initialValues);
|
||||
|
||||
return (
|
||||
<InputList
|
||||
label="Labels"
|
||||
|
@ -29,7 +25,6 @@ export function LabelsTab({
|
|||
);
|
||||
|
||||
function handleChange(values: Values) {
|
||||
setControlledValues(values);
|
||||
onChange(values);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue