Fix invalid support OS version issue in APPM publisher UI

feature/appm-store/pbac
Jayasanka 5 years ago
parent 9fa4047d07
commit c5bc96d8cc

@ -117,7 +117,7 @@ class NewAppUploadForm extends React.Component {
osVersionsHelperText: 'Please select supported OS versions', osVersionsHelperText: 'Please select supported OS versions',
osVersionsValidateStatus: 'error', osVersionsValidateStatus: 'error',
}); });
} else if (this.lowerOsVersion >= this.upperOsVersion) { } else if (parseFloat(this.lowerOsVersion) >= parseFloat(this.upperOsVersion)) {
isFormValid = false; isFormValid = false;
this.setState({ this.setState({
osVersionsHelperText: 'Please select valid range', osVersionsHelperText: 'Please select valid range',
@ -221,7 +221,7 @@ class NewAppUploadForm extends React.Component {
}; };
handleLowerOsVersionChange = (lowerOsVersion) => { handleLowerOsVersionChange = (lowerOsVersion) => {
this.lowerOsVersion = parseFloat(lowerOsVersion); this.lowerOsVersion = lowerOsVersion;
this.setState({ this.setState({
osVersionsValidateStatus: 'validating', osVersionsValidateStatus: 'validating',
osVersionsHelperText: '' osVersionsHelperText: ''
@ -229,7 +229,11 @@ class NewAppUploadForm extends React.Component {
}; };
handleUpperOsVersionChange = (upperOsVersion) => { handleUpperOsVersionChange = (upperOsVersion) => {
this.upperOsVersion = parseFloat(upperOsVersion); if (upperOsVersion === "all") {
this.upperOsVersion = this.props.supportedOsVersions[this.props.supportedOsVersions.length - 1]["versionName"];
}else{
this.upperOsVersion = upperOsVersion;
}
this.setState({ this.setState({
osVersionsValidateStatus: 'validating', osVersionsValidateStatus: 'validating',
osVersionsHelperText: '' osVersionsHelperText: ''
@ -445,7 +449,7 @@ class NewAppUploadForm extends React.Component {
onChange={this.handleUpperOsVersionChange}> onChange={this.handleUpperOsVersionChange}>
{(supportedOsVersions.length > 0) && ( {(supportedOsVersions.length > 0) && (
<Option key="all" <Option key="all"
value={supportedOsVersions[supportedOsVersions.length - 1]["versionName"]}> value="all">
All All
</Option> </Option>
)} )}

Loading…
Cancel
Save