Skip to content

Commit eb6b362

Browse files
committed
feat(FR-2674): always show resource preset row in review; use SourceCodeView for start command
1 parent 8e227dc commit eb6b362

7 files changed

Lines changed: 366 additions & 113 deletions

File tree

packages/backend.ai-ui/src/components/BAIProjectResourceGroupSelect.tsx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,18 +68,17 @@ const BAIProjectResourceGroupSelect: React.FC<
6868
: undefined;
6969

7070
useEffect(() => {
71-
if (
72-
autoSelectDefault &&
73-
autoSelectedOption &&
74-
autoSelectedOption.value !== selectProps.value
75-
) {
71+
if (autoSelectDefault && autoSelectedOption && !controllableValue) {
7672
setControllableValueWithTransition(
7773
autoSelectedOption.value,
7874
autoSelectedOption,
7975
);
8076
}
77+
// controllableValue is intentionally excluded from deps — we only want
78+
// to fire when the available options first appear (autoSelectedOption?.value
79+
// transitions from undefined→name), not on every selection change.
8180
// eslint-disable-next-line react-hooks/exhaustive-deps
82-
}, [autoSelectDefault]);
81+
}, [autoSelectDefault, autoSelectedOption?.value]);
8382

8483
return (
8584
<BAISelect

0 commit comments

Comments
 (0)