Datasource/CloudWatch: Fix some react errors (#26236)

This commit is contained in:
kay delaney 2020-07-17 11:10:32 +01:00 committed by GitHub
parent 373e869652
commit f93c289fed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -256,13 +256,13 @@ export default class LogsCheatSheet extends PureComponent<ExploreStartPageProps,
return (
<div>
<h2>CloudWatch Logs Cheat Sheet</h2>
{CLIQ_EXAMPLES.map(cat => (
<div>
{CLIQ_EXAMPLES.map((cat, i) => (
<div key={`cat-${i}`}>
<div className={`cheat-sheet-item__title ${cx(exampleCategory)}`}>{cat.category}</div>
{cat.examples.map((item, i) => (
<div className="cheat-sheet-item" key={`item-${i}`}>
{cat.examples.map((item, j) => (
<div className="cheat-sheet-item" key={`item-${j}`}>
<h4>{item.title}</h4>
{this.renderExpression(item.expr, `item-${i}`)}
{this.renderExpression(item.expr, `item-${j}`)}
</div>
))}
</div>

View File

@ -155,7 +155,7 @@ export class CloudWatchLogsQueryField extends React.PureComponent<CloudWatchLogs
onLogGroupSearchDebounced = debounce(this.onLogGroupSearch, 300);
componentWillMount = () => {
componentDidMount = () => {
const { datasource, query, onChange } = this.props;
this.setState({