client/src/components/NotesList.js
changeset 161 a642639dbc07
parent 158 964438ef8401
child 168 ea92f4fe783d
equal deleted inserted replaced
160:183b128a4189 161:a642639dbc07
    18   componentDidUpdate(prevProps) {
    18   componentDidUpdate(prevProps) {
    19     if ((this.props.notes || []).size > (prevProps.notes || []).size) {
    19     if ((this.props.notes || []).size > (prevProps.notes || []).size) {
    20     this.node.scrollIntoView({behavior: "smooth", block: "end", inline: "nearest"})
    20     this.node.scrollIntoView({behavior: "smooth", block: "end", inline: "nearest"})
    21     }
    21     }
    22   }
    22   }
    23 
       
    24   // componentDidUpdate(prevProps) {
       
    25   //   if (this.props.notes.size > prevProps.notes.size) {
       
    26   //   this.node.scrollIntoView({behavior: "smooth", block: "end", inline: "nearest"})
       
    27   //   }
       
    28   // }
       
    29 
    23 
    30   componentWillMount() {
    24   componentWillMount() {
    31     Modal.setAppElement('body');
    25     Modal.setAppElement('body');
    32 }
    26 }
    33 
    27