Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"@gravity-ui/app-layout": "^2.1.0",
"@gravity-ui/browserslist-config": "^4.3.0",
"@gravity-ui/chartkit": "^7.37.4",
"@gravity-ui/dashkit": "^9.3.1",
"@gravity-ui/dashkit": "^10.0.0",
"@gravity-ui/date-utils": "^2.5.6",
"@gravity-ui/expresskit": "^2.11.1",
"@gravity-ui/gateway": "^4.10.4",
Expand Down Expand Up @@ -271,4 +271,4 @@
"optionalDependencies": {
"fsevents": "^2.3.2"
}
}
}
2 changes: 1 addition & 1 deletion src/ui/components/DashKit/plugins/Widget/WidgetPlugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const widgetPlugin: PluginWidget = {
},
renderer: function Wrapper(
props: Props,
forwardedRef: React.RefObject<ChartWidgetWithWrapRefProps>,
forwardedRef?: React.RefCallback<ChartWidgetWithWrapRefProps>,
) {
const rootNodeRef = React.useRef<HTMLDivElement>(null);
const {onWidgetLoadData} = useWidgetContext({
Expand Down
4 changes: 3 additions & 1 deletion src/ui/components/DashKit/plugins/Widget/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ export type WidgetPluginData = ConfigItem['data'];
export type WidgetPluginDataWithTabs = ConfigItemWithTabs['data'] & {tabs: Array<CurrentTab>};

export type WidgetPluginProps = Omit<PluginWidgetProps, 'data'> & {
forwardedRef: React.RefObject<ChartKit | ChartKitRef>;
forwardedRef?:
| React.RefObject<ChartKit | ChartKitRef>
| React.RefCallback<ChartKit | ChartKitRef>;
data: WidgetPluginDataWithTabs | WidgetPluginData;
getMarkdown?: (props: {text: string}) => Promise<{result: string; meta?: object}>;
debouncedAdjustWidgetLayout: DebouncedFunc<(props: AdjustWidgetLayoutProps) => void>;
Expand Down
6 changes: 5 additions & 1 deletion src/ui/components/Widgets/Chart/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,11 @@ export type ChartWithProviderProps = ChartsProps & {
dataProvider: ChartKitDataProvider;
};

type ChartRefProp = {forwardedRef: React.RefObject<ChartKit | ChartKitRef>};
type ChartRefProp = {
forwardedRef?:
| React.RefObject<ChartKit | ChartKitRef>
| React.RefCallback<ChartKit | ChartKitRef>;
};

export type ChartWrapperWithRefProps =
| ChartWidgetProviderPropsWithRefProps
Expand Down
5 changes: 3 additions & 2 deletions src/ui/libs/DatalensChartkit/components/ChartKitBase/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,10 @@ export type ChartKitBaseWrapperProps = ChartsProps & {
};

export type ChartKitBaseWrapperWithRefProps = ChartKitBaseWrapperProps & {
forwardedRef:
forwardedRef?:
| React.RefObject<ChartKit | ChartKitRef>
| React.MutableRefObject<ChartKit | ChartKitRef | null>;
| React.MutableRefObject<ChartKit | ChartKitRef | null>
| React.RefCallback<ChartKit | ChartKitRef>;
};

export interface ChartKitWrapperState {
Expand Down
Loading