Fix post upgrade issue related to event title field gets frozen after typing few letters.
This commit is contained in:
parent
63dd33b235
commit
42f4672105
|
@ -123,6 +123,7 @@ export class Event extends React.Component<IEventProps, IEventState> {
|
||||||
this.onSelectDateStart = this.onSelectDateStart.bind(this);
|
this.onSelectDateStart = this.onSelectDateStart.bind(this);
|
||||||
this.onUpdateCoordinates = this.onUpdateCoordinates.bind(this);
|
this.onUpdateCoordinates = this.onUpdateCoordinates.bind(this);
|
||||||
this.onGetErrorMessageTitle = this.onGetErrorMessageTitle.bind(this);
|
this.onGetErrorMessageTitle = this.onGetErrorMessageTitle.bind(this);
|
||||||
|
this.onChangeEventTitle = this.onChangeEventTitle.bind(this);
|
||||||
this.getPeoplePickerItems = this.getPeoplePickerItems.bind(this);
|
this.getPeoplePickerItems = this.getPeoplePickerItems.bind(this);
|
||||||
this.hidePanel = this.hidePanel.bind(this);
|
this.hidePanel = this.hidePanel.bind(this);
|
||||||
this.onDelete = this.onDelete.bind(this);
|
this.onDelete = this.onDelete.bind(this);
|
||||||
|
@ -410,10 +411,21 @@ export class Event extends React.Component<IEventProps, IEventState> {
|
||||||
if (value.length === 0) {
|
if (value.length === 0) {
|
||||||
returnMessage = strings.EventTitleErrorMessage;
|
returnMessage = strings.EventTitleErrorMessage;
|
||||||
} else {
|
} else {
|
||||||
this.setState({ eventData: { ...this.state.eventData, title: value }, disableButton: false, errorMessage: '' });
|
this.setState({disableButton: false, errorMessage: '' });
|
||||||
}
|
}
|
||||||
return returnMessage;
|
return returnMessage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @memberof Event
|
||||||
|
*/
|
||||||
|
private onChangeEventTitle (event:any) {
|
||||||
|
const eventTitle = event.target.value;
|
||||||
|
this.setState({eventData: {...this.state.eventData, title: eventTitle}});
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @private
|
* @private
|
||||||
|
@ -923,6 +935,7 @@ export class Event extends React.Component<IEventProps, IEventState> {
|
||||||
<TextField
|
<TextField
|
||||||
label={strings.EventTitleLabel}
|
label={strings.EventTitleLabel}
|
||||||
value={this.state.eventData ? this.state.eventData.title : ''}
|
value={this.state.eventData ? this.state.eventData.title : ''}
|
||||||
|
onChange={this.onChangeEventTitle}
|
||||||
onGetErrorMessage={this.onGetErrorMessageTitle}
|
onGetErrorMessage={this.onGetErrorMessageTitle}
|
||||||
deferredValidationTime={500}
|
deferredValidationTime={500}
|
||||||
disabled={this.state.userPermissions.hasPermissionAdd || this.state.userPermissions.hasPermissionEdit ? false : true}
|
disabled={this.state.userPermissions.hasPermissionAdd || this.state.userPermissions.hasPermissionEdit ? false : true}
|
||||||
|
|
Loading…
Reference in New Issue