This is an automated email from the ASF dual-hosted git repository.

bbovenzi 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 96b3b91d016 Persist table columns visibility in local storage (#61858) 
(#61868)
96b3b91d016 is described below

commit 96b3b91d0161f9fd8e4eb35987174951d87f5080
Author: Guan-Ming (Wesley) Chiu <[email protected]>
AuthorDate: Sat Feb 14 01:51:44 2026 +0800

    Persist table columns visibility in local storage (#61858) (#61868)
    
    Co-authored-by: Pierre Jeambrun <[email protected]>
---
 airflow-core/src/airflow/ui/src/components/DataTable/DataTable.tsx | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/airflow-core/src/airflow/ui/src/components/DataTable/DataTable.tsx 
b/airflow-core/src/airflow/ui/src/components/DataTable/DataTable.tsx
index e6a91a35d61..7326a200505 100644
--- a/airflow-core/src/airflow/ui/src/components/DataTable/DataTable.tsx
+++ b/airflow-core/src/airflow/ui/src/components/DataTable/DataTable.tsx
@@ -29,8 +29,9 @@ import {
   type Table as TanStackTable,
   type Updater,
 } from "@tanstack/react-table";
-import React, { type ReactNode, useCallback, useRef, useState } from "react";
+import React, { type ReactNode, useCallback, useRef } from "react";
 import { useTranslation } from "react-i18next";
+import { useLocalStorage } from "usehooks-ts";
 
 import { CardList } from "src/components/DataTable/CardList";
 import { TableList } from "src/components/DataTable/TableList";
@@ -105,7 +106,8 @@ export const DataTable = <TData,>({
     },
     [onStateChange],
   );
-  const [columnVisibility, setColumnVisibility] = useState<VisibilityState>(
+  const [columnVisibility, setColumnVisibility] = 
useLocalStorage<VisibilityState>(
+    `dataTable:${modelName}:columnVisibility`,
     initialState?.columnVisibility ?? {},
   );
 

Reply via email to