mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Eslint: Remove scenes rule for member accessability (#71087)
This commit is contained in:
@@ -11,12 +11,12 @@ export interface SceneRadioToggleState extends SceneObjectState {
|
||||
}
|
||||
|
||||
export class SceneRadioToggle extends SceneObjectBase<SceneRadioToggleState> {
|
||||
public onChange = (value: string) => {
|
||||
onChange = (value: string) => {
|
||||
this.setState({ value });
|
||||
this.state.onChange(value);
|
||||
};
|
||||
|
||||
public static Component = ({ model }: SceneComponentProps<SceneRadioToggle>) => {
|
||||
static Component = ({ model }: SceneComponentProps<SceneRadioToggle>) => {
|
||||
const { options, value } = model.useState();
|
||||
|
||||
return <RadioButtonGroup options={options} value={value} onChange={model.onChange} />;
|
||||
|
||||
@@ -8,11 +8,11 @@ export interface SceneSearchBoxState extends SceneObjectState {
|
||||
}
|
||||
|
||||
export class SceneSearchBox extends SceneObjectBase<SceneSearchBoxState> {
|
||||
public onChange = (evt: React.FormEvent<HTMLInputElement>) => {
|
||||
onChange = (evt: React.FormEvent<HTMLInputElement>) => {
|
||||
this.setState({ value: evt.currentTarget.value });
|
||||
};
|
||||
|
||||
public static Component = ({ model }: SceneComponentProps<SceneSearchBox>) => {
|
||||
static Component = ({ model }: SceneComponentProps<SceneSearchBox>) => {
|
||||
const { value } = model.useState();
|
||||
|
||||
return <Input width={25} placeholder="Search..." value={value} onChange={model.onChange} />;
|
||||
|
||||
@@ -71,7 +71,7 @@ export interface HandlerDrilldownViewBehaviorState extends SceneObjectState {
|
||||
export class HandlerDrilldownViewBehavior extends SceneObjectBase<HandlerDrilldownViewBehaviorState> {
|
||||
protected _urlSync = new SceneObjectUrlSyncConfig(this, { keys: ['handler'] });
|
||||
|
||||
public constructor() {
|
||||
constructor() {
|
||||
super({});
|
||||
|
||||
this.addActivationHandler(() => {
|
||||
@@ -107,11 +107,11 @@ export class HandlerDrilldownViewBehavior extends SceneObjectBase<HandlerDrilldo
|
||||
});
|
||||
}
|
||||
|
||||
public getUrlState() {
|
||||
getUrlState() {
|
||||
return { handler: this.state.handler };
|
||||
}
|
||||
|
||||
public updateFromUrl(values: SceneObjectUrlValues) {
|
||||
updateFromUrl(values: SceneObjectUrlValues) {
|
||||
if (typeof values.handler === 'string' || values.handler === undefined) {
|
||||
this.setState({ handler: values.handler });
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ interface DashboardSceneState extends SceneObjectState {
|
||||
}
|
||||
|
||||
export class DashboardScene extends SceneObjectBase<DashboardSceneState> {
|
||||
public static Component = DashboardSceneRenderer;
|
||||
static Component = DashboardSceneRenderer;
|
||||
}
|
||||
|
||||
function DashboardSceneRenderer({ model }: SceneComponentProps<DashboardScene>) {
|
||||
|
||||
@@ -44,7 +44,7 @@ export interface DashboardLoaderState {
|
||||
export class DashboardLoader extends StateManagerBase<DashboardLoaderState> {
|
||||
private cache: Record<string, DashboardScene> = {};
|
||||
|
||||
public async load(uid: string) {
|
||||
async load(uid: string) {
|
||||
const fromCache = this.cache[uid];
|
||||
if (fromCache) {
|
||||
this.setState({ dashboard: fromCache });
|
||||
@@ -82,7 +82,7 @@ export class DashboardLoader extends StateManagerBase<DashboardLoaderState> {
|
||||
this.setState({ dashboard, isLoading: false });
|
||||
}
|
||||
|
||||
public clearState() {
|
||||
clearState() {
|
||||
this.setState({ dashboard: undefined, loadError: undefined, isLoading: false });
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ export class ShareQueryDataProvider extends SceneObjectBase<ShareQueryDataProvid
|
||||
private _querySub: Unsubscribable | undefined;
|
||||
private _sourceDataDeactivationHandler?: SceneDeactivationHandler;
|
||||
|
||||
public constructor(state: ShareQueryDataProviderState) {
|
||||
constructor(state: ShareQueryDataProviderState) {
|
||||
super(state);
|
||||
|
||||
this.addActivationHandler(() => {
|
||||
|
||||
Reference in New Issue
Block a user