mirror of
https://github.com/apache/superset.git
synced 2026-05-11 10:55:43 +00:00
feat(table): Export table data with "Search box" enabled (#36281)
Co-authored-by: RebeccaH2003 <114100529+RebeccaH2003@users.noreply.github.com>
This commit is contained in:
@@ -600,8 +600,11 @@ function ExploreViewContainer(props) {
|
||||
}
|
||||
});
|
||||
|
||||
const previousOwnState = usePrevious(props.ownState);
|
||||
useEffect(() => {
|
||||
if (props.ownState !== undefined) {
|
||||
const strip = s =>
|
||||
s && typeof s === 'object' ? omit(s, ['clientView']) : s;
|
||||
if (!isEqual(strip(previousOwnState), strip(props.ownState))) {
|
||||
onQuery();
|
||||
reRenderChart();
|
||||
}
|
||||
@@ -938,10 +941,14 @@ function mapStateToProps(state) {
|
||||
const form_data = isDeckGLChart ? getDeckGLFormData() : controlsBasedFormData;
|
||||
|
||||
const slice_id = form_data.slice_id ?? slice?.slice_id ?? 0; // 0 - unsaved chart
|
||||
|
||||
// exclude clientView from extra_form_data; keep other ownState pieces
|
||||
const ownStateForQuery = omit(dataMask[slice_id]?.ownState, ['clientView']);
|
||||
|
||||
form_data.extra_form_data = mergeExtraFormData(
|
||||
{ ...form_data.extra_form_data },
|
||||
{
|
||||
...dataMask[slice_id]?.ownState,
|
||||
...ownStateForQuery,
|
||||
},
|
||||
);
|
||||
const chart = charts[slice_id];
|
||||
|
||||
Reference in New Issue
Block a user