mirror of
https://github.com/apache/superset.git
synced 2026-07-21 06:05:46 +00:00
Fix lint
This commit is contained in:
@@ -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;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user