mirror of
https://github.com/apache/superset.git
synced 2026-04-27 12:05:24 +00:00
Re-enable rule prefer-destructuring (only for objects) (#10867)
This commit is contained in:
committed by
GitHub
parent
c51168a30a
commit
352e8a1afd
@@ -148,9 +148,9 @@ export default class ResultSet extends React.PureComponent<
|
||||
}
|
||||
renderControls() {
|
||||
if (this.props.search || this.props.visualize || this.props.csv) {
|
||||
let data = this.props.query.results.data;
|
||||
let { data } = this.props.query.results;
|
||||
if (this.props.cache && this.props.query.cached) {
|
||||
data = this.state.data;
|
||||
({ data } = this.state);
|
||||
}
|
||||
return (
|
||||
<div className="ResultSetControls">
|
||||
@@ -199,7 +199,7 @@ export default class ResultSet extends React.PureComponent<
|
||||
return <div className="noControls" />;
|
||||
}
|
||||
render() {
|
||||
const query = this.props.query;
|
||||
const { query } = this.props;
|
||||
const height = Math.max(
|
||||
0,
|
||||
this.props.search ? this.props.height - SEARCH_HEIGHT : this.props.height,
|
||||
@@ -263,12 +263,12 @@ export default class ResultSet extends React.PureComponent<
|
||||
</div>
|
||||
);
|
||||
} else if (query.state === 'success' && query.results) {
|
||||
const results = query.results;
|
||||
const { results } = query;
|
||||
let data;
|
||||
if (this.props.cache && query.cached) {
|
||||
data = this.state.data;
|
||||
({ data } = this.state);
|
||||
} else if (results && results.data) {
|
||||
data = results.data;
|
||||
({ data } = results);
|
||||
}
|
||||
if (data && data.length > 0) {
|
||||
const expandedColumns = results.expanded_columns
|
||||
|
||||
Reference in New Issue
Block a user