mirror of
https://github.com/apache/superset.git
synced 2026-07-21 06:05:46 +00:00
Merge remote-tracking branch 'origin/master' into feat/antd6-upgrade
# Conflicts: # UPDATING.md # superset-frontend/packages/superset-ui-core/src/components/Select/AsyncSelect.tsx
This commit is contained in:
@@ -2106,7 +2106,7 @@ describe('plugin-chart-table', () => {
|
||||
|
||||
await waitFor(() => {
|
||||
expect(screen.getByRole('textbox')).toHaveValue('Michael');
|
||||
expect(screen.getByLabelText('Search 0 records')).toHaveValue(
|
||||
expect(screen.getByLabelText('Search records')).toHaveValue(
|
||||
'Michael',
|
||||
);
|
||||
});
|
||||
@@ -2534,3 +2534,33 @@ test('sorts genuinely string columns alphanumerically', () => {
|
||||
const values = Array.from(cells).map(td => td.textContent);
|
||||
expect(values).toEqual(['apple', 'banana', 'cherry']);
|
||||
});
|
||||
|
||||
test('TableChart should NOT emit cross-filter when clicking a cell in a not-filterable column', () => {
|
||||
const setDataMask = jest.fn();
|
||||
const props = transformProps({
|
||||
...testData.basic,
|
||||
datasource: {
|
||||
...testData.basic.datasource,
|
||||
columns: [{ column_name: 'name', filterable: false } as any],
|
||||
},
|
||||
hooks: { setDataMask },
|
||||
emitCrossFilters: true,
|
||||
});
|
||||
render(
|
||||
<ProviderWrapper>
|
||||
<TableChart
|
||||
{...props}
|
||||
emitCrossFilters
|
||||
setDataMask={setDataMask}
|
||||
sticky={false}
|
||||
/>
|
||||
</ProviderWrapper>,
|
||||
);
|
||||
|
||||
fireEvent.click(screen.getByText('Michael'));
|
||||
|
||||
const crossFilterCall = setDataMask.mock.calls.find(
|
||||
(call: any[]) => call[0]?.filterState?.filters,
|
||||
);
|
||||
expect(crossFilterCall).toBeUndefined();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user