bbovenzi commented on code in PR #51115:
URL: https://github.com/apache/airflow/pull/51115#discussion_r2112452995
##########
airflow-core/src/airflow/ui/src/pages/DagsList/DagsList.tsx:
##########
@@ -255,19 +255,21 @@ export const DagsList = () => {
</VStack>
<ToggleTableDisplay display={display} setDisplay={setDisplay} />
<Box overflow="auto">
- <DataTable
- cardDef={cardDef}
- columns={columns}
- data={data.dags}
- displayMode={display}
- errorMessage={<ErrorAlert error={error} />}
- initialState={tableURLState}
- isLoading={isLoading}
- modelName="Dag"
- onStateChange={setTableURLState}
- skeletonCount={display === "card" ? 5 : undefined}
- total={data.total_entries}
- />
+ {data !== undefined && (
Review Comment:
Adding this check means that the DataTable component might not always handle
loading, empty state and error states. Let's just do `data.dags ?? []`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]