feat: add env field in deploy form
This commit is contained in:
@@ -33,7 +33,6 @@ const LabelSelector: React.FC<LabelSelectorProps> = ({
|
||||
});
|
||||
setLabelList(list);
|
||||
}
|
||||
console.log('labelsData=========', labelsData);
|
||||
}, [labels]);
|
||||
|
||||
const handleLabelListChange = useCallback(
|
||||
|
||||
@@ -26,6 +26,7 @@ const Inner: React.FC<LabelSelectorProps> = ({
|
||||
}) => {
|
||||
const intl = useIntl();
|
||||
const buttonRef = useRef<HTMLButtonElement>(null);
|
||||
const boxRef = useRef<HTMLDivElement>(null);
|
||||
|
||||
const updateLabels = (list: { key: string; value: string }[]) => {
|
||||
const newLabels = _.reduce(
|
||||
@@ -57,11 +58,6 @@ const Inner: React.FC<LabelSelectorProps> = ({
|
||||
];
|
||||
onLabelListChange(newLabelList);
|
||||
updateLabels(newLabelList);
|
||||
|
||||
setTimeout(() => {
|
||||
// button scroll to view
|
||||
buttonRef.current?.scrollIntoView?.({ behavior: 'smooth' });
|
||||
}, 100);
|
||||
};
|
||||
|
||||
const handleOnDelete = (index: string) => {
|
||||
|
||||
@@ -51,9 +51,9 @@ const ListInput: React.FC<ListInputProps> = (props) => {
|
||||
uid: countRef.current
|
||||
});
|
||||
setList(values);
|
||||
setTimeout(() => {
|
||||
buttonRef.current?.scrollIntoView?.({ behavior: 'smooth' });
|
||||
}, 100);
|
||||
// setTimeout(() => {
|
||||
// buttonRef.current?.scrollIntoView?.({ behavior: 'smooth' });
|
||||
// }, 100);
|
||||
};
|
||||
|
||||
React.useEffect(() => {
|
||||
|
||||
Reference in New Issue
Block a user