Skip to content

Commit

Permalink
fix(knowledge): fix versions default options when add files
Browse files Browse the repository at this point in the history
  • Loading branch information
Carrotzpc committed Mar 21, 2024
1 parent 661f25a commit e784d7b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/pages/KnowledgeDetail/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,10 @@ class KnowledgeDetail$$Page extends React.Component {
versions: versions,
};
});
const dataset = this.getCurrentDatasetAndVersion().dataset;
this.setState({
datasetList,
datasetVersionList: datasetList.find(d => d.value === dataset)?.versions,
});
}

Expand Down Expand Up @@ -469,7 +471,7 @@ class KnowledgeDetail$$Page extends React.Component {
<Select
__component_name="Select"
_sdkSwrGetFunc={{}}
allowClear={true}
allowClear={false}
disabled={false}
onChange={function () {
return this.onDatasetChange.apply(
Expand All @@ -488,7 +490,7 @@ class KnowledgeDetail$$Page extends React.Component {
<Select
__component_name="Select"
_sdkSwrGetFunc={{}}
allowClear={true}
allowClear={false}
disabled={false}
onChange={function () {
return this.onDatasetVersionChange.apply(
Expand Down

0 comments on commit e784d7b

Please sign in to comment.