This commit is contained in:
Beto Dealmeida
2026-05-05 20:11:56 -04:00
parent 3aad565eab
commit 9c5e6d187b
5 changed files with 11 additions and 4 deletions

View File

@@ -17,6 +17,7 @@
* under the License.
*/
import { getExtensionsRegistry } from '@superset-ui/core';
import type { ComponentType, ReactNode } from 'react';
import { Provider as ReduxProvider } from 'react-redux';
import { QueryParamProvider } from 'use-query-params';
import { ReactRouter5Adapter } from 'use-query-params/adapters/react-router-5';
@@ -64,7 +65,7 @@ export const EmbeddedContextProviders: React.FC<{
}> = ({ children }) => {
const RootContextProviderExtension = extensionsRegistry.get(
'root.context.provider',
);
) as ComponentType<{ children?: ReactNode }> | undefined;
return (
<SupersetThemeProvider themeController={themeController}>

View File

@@ -188,7 +188,9 @@ function CollectionControl({
// Two items can collide when keyAccessor returns falsy and the index
// fallback is used — breaking dnd-kit reordering and React reconciliation.
// Assign a stable nanoid per item ref when no key is available.
const generatedIdsRef = useRef<WeakMap<CollectionItem, string>>(new WeakMap());
const generatedIdsRef = useRef<WeakMap<CollectionItem, string>>(
new WeakMap(),
);
const itemIds = useMemo(
() =>
value.map(item => {

View File

@@ -34,6 +34,7 @@ import {
Tooltip,
Row,
type OnClickHandler,
type ButtonProps as CoreButtonProps,
} from '@superset-ui/core/components';
import { Icons } from '@superset-ui/core/components/Icons';
import { MenuObjectProps } from 'src/types/bootstrapTypes';
@@ -148,7 +149,7 @@ export interface ButtonProps {
'data-test'?: string;
buttonStyle: 'primary' | 'secondary' | 'dashed' | 'link' | 'tertiary';
loading?: boolean;
icon?: ReactNode;
icon?: CoreButtonProps['icon'];
component?: ReactNode;
}

View File

@@ -18,6 +18,7 @@
*/
import { getExtensionsRegistry } from '@superset-ui/core';
import type { ComponentType, ReactNode } from 'react';
import { Provider as ReduxProvider } from 'react-redux';
import { QueryParamProvider } from 'use-query-params';
import { ReactRouter5Adapter } from 'use-query-params/adapters/react-router-5';
@@ -39,7 +40,7 @@ export const RootContextProviders: React.FC<{ children?: React.ReactNode }> = ({
}) => {
const RootContextProviderExtension = extensionsRegistry.get(
'root.context.provider',
);
) as ComponentType<{ children?: ReactNode }> | undefined;
return (
<SupersetThemeProvider themeController={themeController}>

View File

@@ -82,6 +82,8 @@ class DatasetMetricData(TypedDict, total=False):
warning_markdown: str | None
warning_text: str | None
verbose_name: str | None
# Type alias for database connection mutator function
DBConnectionMutator: TypeAlias = Callable[
[URL, dict[str, Any], str | None, Any, "QuerySource | None"],