mirror of
https://github.com/apache/superset.git
synced 2026-04-18 23:55:00 +00:00
Pass query instead of slice to Action buttons to prevent lagging query (#1948)
* Pass query instead of slice to Action buttons to prevent lagging query * Delete beforeOpen and put DisplayQueryButton in pure component
This commit is contained in:
@@ -7,9 +7,10 @@ import DisplayQueryButton from './DisplayQueryButton';
|
||||
const propTypes = {
|
||||
canDownload: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]).isRequired,
|
||||
slice: PropTypes.object.isRequired,
|
||||
query: PropTypes.string,
|
||||
};
|
||||
|
||||
export default function ExploreActionButtons({ canDownload, slice }) {
|
||||
export default function ExploreActionButtons({ canDownload, slice, query }) {
|
||||
const exportToCSVClasses = cx('btn btn-default btn-sm', {
|
||||
'disabled disabledButton': !canDownload,
|
||||
});
|
||||
@@ -37,7 +38,7 @@ export default function ExploreActionButtons({ canDownload, slice }) {
|
||||
<i className="fa fa-file-text-o"></i> .csv
|
||||
</a>
|
||||
|
||||
<DisplayQueryButton slice={slice} />
|
||||
<DisplayQueryButton query={query} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user