message: More responsive notes form. Fixes
diff: @@ -19,21 +19,38 @@ function mapStateToProps(state: RootState, props: ProvidedProps): StoreProps {
  type Props = ProvidedProps & StoreProps;
  +interface State {
  + liveNotes: string;
  +}
  +
  const maxLength = 120;
  -class NotesForm extends React.Component<Props> {
  +class NotesForm extends React.Component<Props, State> {
  + state: State = { liveNotes: this.props.notes || '' };
  +
  + componentDidUpdate(prevProps: Props) {
  + if (prevProps.notes !== this.props.notes) {
  + this.setState({ liveNotes: this.props.notes || '' });
  + }
  + }
  +
  + componentWillUnmount() {
  + this.saveNotes();
  + }
  +
  render() {
  - const { notes = '' } = this.props;
  + const { liveNotes } = this.state;
  return (
  <form name="notes">
  <textarea
  name="data"
  placeholder={t('Notes.Help')}
  maxLength={maxLength}
  - value={notes}
  + value={liveNotes}
  onChange={this.onNotesUpdated}
  + onBlur={this.saveNotes}
  />
  - {notes && notes.length > maxLength && (
  + {liveNotes && liveNotes.length > maxLength && (
  <span className="textarea-error">{t('Notes.Error')}</span>
  )}
  </form>
  @@ -42,8 +59,13 @@ class NotesForm extends React.Component<Props> {
  private onNotesUpdated = (e: React.ChangeEvent<HTMLTextAreaElement>) => {
  const notes = e.target.value as string;
  + this.setState({ liveNotes: notes || '' });
  + };
  +
  + private saveNotes = () => {
  + const notes = this.state.liveNotes;
  const info = this.props.item.dimInfo;
  - if (info) {
  + if (info && info.notes !== notes) {
  if (notes.length) {
  info.notes = notes;
  } else {
  