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:
Haoqian Zhang
2025-12-08 23:42:10 -05:00
committed by GitHub
parent 3940354120
commit f4b919bf7d
10 changed files with 765 additions and 44 deletions

View File

@@ -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];