Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix the bug that index field is not getting populated when editing a … #783

Merged
merged 3 commits into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,11 @@ export function DataSource(props: DataSourceProps) {
const { setFieldValue } = useFormikContext();

useEffect(() => {
setFieldValue('index', []);
setFieldValue('timeField', undefined);
setFieldValue('filters', []);

const getInitialIndices = async () => {
await dispatch(getIndices(queryText, dataSourceId));
setFieldValue('index', props.formikProps.values.index);
setFieldValue('timeField', props.formikProps.values.timeField);
setFieldValue('filters', props.formikProps.values.filters);
};
getInitialIndices();
}, [dataSourceId]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Compatible with OpenSearch Dashboards 2.15.0

* Fix handling of special characters in categorical values ([#757](https://github.com/opensearch-project/anomaly-detection-dashboards-plugin/pull/757))
* Fix Warning Message About Custom Result Index Despite Existing Indices ([#759](https://github.com/opensearch-project/anomaly-detection-dashboards-plugin/pull/759))
* Fix index field not getting populated when editing a detector ([#783](https://github.com/opensearch-project/anomaly-detection-dashboards-plugin/pull/783))

### Maintenance

Expand Down
Loading