Compare commits

...

4 Commits

Author SHA1 Message Date
Chris-MS-896
417a6151be Merge branch 'master' into v-yiqcao/throughoutValidation 2020-12-31 18:59:42 -06:00
Chris-MS-896
3c25788e72 'minor change' 2020-12-22 22:11:24 -06:00
Chris-MS-896
1c8deb1fcc no message 2020-12-22 21:53:28 -06:00
artrejo
4664038df0 Add onChange event to throughput text field 2020-12-22 16:59:50 -08:00
3 changed files with 15 additions and 1 deletions

View File

@@ -801,7 +801,12 @@ export class SettingsComponent extends React.Component<SettingsComponentProps, S
private onMaxAutoPilotThroughputChange = (newThroughput: number): void => private onMaxAutoPilotThroughputChange = (newThroughput: number): void =>
this.setState({ autoPilotThroughput: newThroughput }); this.setState({ autoPilotThroughput: newThroughput });
private onThroughputChange = (newThroughput: number): void => this.setState({ throughput: newThroughput }); private onThroughputChange = (newThroughput: number): void => {
if (newThroughput < 400) {
return alert("The value should not small than 400");
}
this.setState({ throughput: newThroughput });
};
private onAutoPilotSelected = (isAutoPilotSelected: boolean): void => private onAutoPilotSelected = (isAutoPilotSelected: boolean): void =>
this.setState({ isAutoPilotSelected: isAutoPilotSelected }); this.setState({ isAutoPilotSelected: isAutoPilotSelected });

View File

@@ -267,6 +267,12 @@ export class ThroughputInputViewModel extends WaitsForTemplateViewModel {
return true; return true;
}; };
public onThroughputCheck = (event: any) => {
if (event.value() < 400) {
window.alert("The value should not small than 400");
}
};
private _getSanitizedValue(): number { private _getSanitizedValue(): number {
let throughput = this.value(); let throughput = this.value();

View File

@@ -150,6 +150,9 @@
'aria-label': ariaLabel, 'aria-label': ariaLabel,
disabled: overrideWithAutoPilotSettings(), disabled: overrideWithAutoPilotSettings(),
required: isManualThroughputInputFieldRequired() required: isManualThroughputInputFieldRequired()
},
event:{
change: onThroughputCheck
}" }"
/> />
</div> </div>