mirror of
https://github.com/apache/superset.git
synced 2026-08-04 04:52:32 +00:00
fix: Ensure drill-through chart field works consistently across CRUD and Explore paths
Fixes two issues with the drill-through chart configuration: 1. **SelectAsyncControl crash on clear**: Fixed isLabeledValue function to handle null values properly when clearing selections 2. **Missing field in Explore path**: Added drill_through_chart_id to both dataset API response and SqlaTable.data property serialization This ensures the drill-through chart field loads and saves correctly whether accessed from: - Datasets CRUD interface - Explore → Edit Dataset flow 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -104,3 +104,15 @@ test('Should send correct props to Select component - function onChange multi:fa
|
||||
userEvent.click(await screen.findByText('onChange'));
|
||||
expect(props.onChange).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
|
||||
test('Should handle null value without crashing when clearing selection', () => {
|
||||
const props = createProps();
|
||||
const { rerender } = render(<SelectAsyncControl {...props} />, {
|
||||
useRedux: true,
|
||||
});
|
||||
|
||||
// Simulate clearing the selection by passing null value
|
||||
expect(() => {
|
||||
rerender(<SelectAsyncControl {...props} value={null} />);
|
||||
}).not.toThrow();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user