mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
Fix chart annotation source type showing perpetual loading when re-selecting the same value. (#10036)
Remove accidental console.log used during testing. Co-authored-by: Natalie Ruhe <natalie@preset.io>
This commit is contained in:
@@ -240,12 +240,16 @@ export default class AnnotationLayer extends React.PureComponent {
|
||||
}
|
||||
|
||||
handleAnnotationSourceType(sourceType) {
|
||||
this.setState({
|
||||
sourceType,
|
||||
isLoadingOptions: true,
|
||||
validationErrors: {},
|
||||
value: null,
|
||||
});
|
||||
const { sourceType: prevSourceType } = this.state;
|
||||
|
||||
if (prevSourceType !== sourceType) {
|
||||
this.setState({
|
||||
sourceType,
|
||||
isLoadingOptions: true,
|
||||
validationErrors: {},
|
||||
value: null,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
handleValue(value) {
|
||||
|
||||
@@ -96,6 +96,8 @@ export default class SelectControl extends React.PureComponent {
|
||||
}
|
||||
}
|
||||
|
||||
// Beware: This is acting like an on-click instead of an on-change
|
||||
// (firing every time user chooses vs firing only if a new option is chosen).
|
||||
onChange(opt) {
|
||||
let optionValue = null;
|
||||
if (opt) {
|
||||
|
||||
Reference in New Issue
Block a user