Skip to content

Commit

Permalink
Fix requestHeadersGetter method (#1894)
Browse files Browse the repository at this point in the history
  • Loading branch information
flops authored Dec 6, 2024
1 parent aba9f45 commit f136aa7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/shared/types/dash.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type {ItemDropProps} from '@gravity-ui/dashkit';

import type {DASH_INFO_HEADER} from '../constants';
import type {Operations} from '../modules';

import type {ClientChartsConfig, Dictionary, Entry, EntryScope, StringParams} from './index';
Expand All @@ -9,7 +8,7 @@ export enum ControlType {
Dash = 'control_dash',
}

export type DashChartRequestContext = Record<typeof DASH_INFO_HEADER, string>;
export type DashChartRequestContext = Record<string, string>;

export enum DashTabItemType {
Title = 'title',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -700,13 +700,13 @@ class GroupControl extends React.PureComponent<PluginGroupControlProps, PluginGr
return this._getDistinctsMemo;
}

private requestHeadersGetter() {
if (this?.context?.dataProviderContextGetter) {
private requestHeadersGetter = () => {
if (this.context?.dataProviderContextGetter) {
return this.context.dataProviderContextGetter(this.props.id);
}

return {};
}
};

private renderControl(item: DashTabItemControlSingle) {
const {workbookId} = this.props;
Expand Down

0 comments on commit f136aa7

Please sign in to comment.