mirror of
https://github.com/grafana/grafana.git
synced 2025-02-10 23:55:47 -06:00
Changes after PR comments
This commit is contained in:
parent
67e8958aec
commit
236d7b1213
@ -15,10 +15,10 @@ interface State {
|
||||
}
|
||||
|
||||
export class TestRuleButton extends PureComponent<Props, State> {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = { isLoading: false, testRuleResponse: {} };
|
||||
}
|
||||
readonly state: State = {
|
||||
isLoading: false,
|
||||
testRuleResponse: {},
|
||||
};
|
||||
|
||||
componentDidMount() {
|
||||
this.testRule();
|
||||
@ -39,10 +39,6 @@ export class TestRuleButton extends PureComponent<Props, State> {
|
||||
return <LoadingPlaceholder text="Evaluating rule" />;
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<JSONFormatter json={testRuleResponse} />
|
||||
</>
|
||||
);
|
||||
return <JSONFormatter json={testRuleResponse} />;
|
||||
}
|
||||
}
|
||||
|
@ -1,15 +1,13 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`Render should render component 1`] = `
|
||||
<Fragment>
|
||||
<JSONFormatter
|
||||
config={
|
||||
Object {
|
||||
"animateOpen": true,
|
||||
}
|
||||
<JSONFormatter
|
||||
config={
|
||||
Object {
|
||||
"animateOpen": true,
|
||||
}
|
||||
json={Object {}}
|
||||
open={3}
|
||||
/>
|
||||
</Fragment>
|
||||
}
|
||||
json={Object {}}
|
||||
open={3}
|
||||
/>
|
||||
`;
|
||||
|
@ -52,7 +52,7 @@ export class EditorTabBody extends PureComponent<Props, State> {
|
||||
onToggleToolBarView = (item: EditorToolbarView) => {
|
||||
this.setState({
|
||||
openView: item,
|
||||
isOpen: this.state.openView !== item ? true : !this.state.isOpen,
|
||||
isOpen: this.state.openView !== item || !this.state.isOpen,
|
||||
});
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user