pierrejeambrun commented on code in PR #61280:
URL: https://github.com/apache/airflow/pull/61280#discussion_r2769415098


##########
airflow-core/src/airflow/ui/src/components/DataTable/DataTable.tsx:
##########
@@ -109,9 +111,11 @@ export const DataTable = <TData,>({
     [onStateChange],
   );
 
-  const [columnVisibility, setColumnVisibility] = useState<VisibilityState>(
-    initialState?.columnVisibility ?? {},
-  );
+  const [columnVisibility, setColumnVisibility] = 
useLocalStorage<VisibilityState>(
+  'datatable:${modelName}:columnVisibility',

Review Comment:
   This can't work like this, you are not doing interpolation.
   
   ```suggestion
     `dataTable:${modelName}:columnVisibility`,
   ```



##########
airflow-core/src/airflow/ui/src/components/DataTable/DataTable.tsx:
##########
@@ -16,6 +16,8 @@
  * specific language governing permissions and limitations
  * under the License.
  */
+
+import { useLocalStorage } from 'src/utils/useLocalStorage';

Review Comment:
   This doesn't exists. Import path is wrong.



-- 
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]

Reply via email to