This is an automated email from the ASF dual-hosted git repository.
jscheffl pushed a commit to branch v3-1-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/v3-1-test by this push:
new 431baacde0f [v3-1-test] Replace defaultValue with value in
TaskTrySelect (#56141) (#56258)
431baacde0f is described below
commit 431baacde0f333852d0cd799679daed943c70c03
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Tue Sep 30 23:56:58 2025 +0200
[v3-1-test] Replace defaultValue with value in TaskTrySelect (#56141)
(#56258)
* Replace defaultValue with value in TaskTrySelect
Changed the Select component to use the controlled 'value' prop instead of
'defaultValue' for try number selection, ensuring the selected value updates
correctly with state changes.
* fix: Reorder props in TaskTrySelect for linting compliance
Applied prop ordering fix as requested in code review.
Props are now alphabetically ordered in the Select.Root component.
(cherry picked from commit 3f7991f30e8c3f2dd85755ee02267b9ec882bcbe)
Co-authored-by: Vedant Mamgain <[email protected]>
---
airflow-core/src/airflow/ui/src/components/TaskTrySelect.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/airflow-core/src/airflow/ui/src/components/TaskTrySelect.tsx
b/airflow-core/src/airflow/ui/src/components/TaskTrySelect.tsx
index 1d5614ba04a..bfb9f48c1ce 100644
--- a/airflow-core/src/airflow/ui/src/components/TaskTrySelect.tsx
+++ b/airflow-core/src/airflow/ui/src/components/TaskTrySelect.tsx
@@ -89,7 +89,6 @@ export const TaskTrySelect = ({ onSelectTryNumber,
selectedTryNumber, taskInstan
<Select.Root
collection={tryOptions}
data-testid="select-task-try"
- defaultValue={[selectedTryNumber?.toString() ??
finalTryNumber.toString()]}
onValueChange={(details) => {
if (onSelectTryNumber) {
onSelectTryNumber(
@@ -97,6 +96,7 @@ export const TaskTrySelect = ({ onSelectTryNumber,
selectedTryNumber, taskInstan
);
}
}}
+ value={[selectedTryNumber?.toString() ?? finalTryNumber.toString()]}
width="200px"
>
<Select.Trigger>