Skip to content

Commit

Permalink
fix: set default datasource cate
Browse files Browse the repository at this point in the history
  • Loading branch information
jsers committed Sep 7, 2022
1 parent 2d1f858 commit 5687fba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pages/dashboard/Editor/QueryEditor/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export default function index({ chartForm }) {
</AdvancedWrap>
<Form.Item shouldUpdate={(prev, curr) => prev.datasourceCate !== curr.datasourceCate} noStyle>
{({ getFieldValue }) => {
const cate = getFieldValue('datasourceCate');
const cate = getFieldValue('datasourceCate') || 'prometheus';
if (cate === 'prometheus') {
return <Prometheus chartForm={chartForm} />;
}
Expand Down

0 comments on commit 5687fba

Please sign in to comment.