This commit is contained in:
Beto Dealmeida
2026-04-17 18:54:28 -04:00
parent 392be53315
commit c3bc18de07
2 changed files with 9 additions and 5 deletions

View File

@@ -19,7 +19,7 @@
import { t } from '@apache-superset/core/translation';
import { Alert } from '@apache-superset/core/components';
import { styled } from '@apache-superset/core/theme';
import { useCallback, useEffect, useRef, useState, ReactNode } from 'react';
import { useCallback, useEffect, useLayoutEffect, useRef, useState, ReactNode } from 'react';
import cx from 'classnames';
import TableCollection from '@superset-ui/core/components/TableCollection';
import BulkTagModal from 'src/features/tags/BulkTagModal';
@@ -349,9 +349,12 @@ export function ListView<T extends object = any>({
}>(null);
// Wire the optional external filtersRef to our internal filterControlsRef.
useEffect(() => {
// useLayoutEffect fires synchronously after DOM mutations, guaranteeing the
// ref is populated before the first paint and after every update.
useLayoutEffect(() => {
if (filtersRef) {
(filtersRef as any).current = filterControlsRef.current;
(filtersRef as React.MutableRefObject<typeof filterControlsRef.current>).current =
filterControlsRef.current;
}
});

View File

@@ -34,12 +34,13 @@ from superset.utils import json
class SemanticLayerDAO(BaseDAO[SemanticLayer], AbstractSemanticLayerDAO):
# SemanticLayer uses uuid as the primary key
id_column_name = "uuid"
"""
Data Access Object for SemanticLayer model.
"""
# SemanticLayer uses uuid as the primary key
id_column_name = "uuid"
model_cls = SemanticLayer
@staticmethod