react-popover icon indicating copy to clipboard operation
react-popover copied to clipboard

rm deprecated componentWillReceiveProps

Open a-x- opened this issue 5 years ago • 7 comments

fixes #207

a-x- avatar Aug 15 '19 21:08 a-x-

When it will be Merged? I really need it

slonofanya avatar Nov 14 '19 14:11 slonofanya

after applying this patch, popovers no longer open for me. There are no errors or warnings in the console. The HEAD of master (905e7545e32806abf8ee38f4557621e9bc5b1c1a) works fine.

edit:

The ref's containerEl is always null with this change applied.

may be related to https://stackoverflow.com/a/50019873/340799

edit 2:

splitting the open/enter and close/exit calls resolved this for me. It can't be assumed that the state will toggle everytime:

  componentDidUpdate(propsPrev, statePrev) {
    //log(`Component did update!`)
    const willOpen = !propsPrev.isOpen && this.props.isOpen
    const willClose = propsPrev.isOpen && !this.props.isOpen

    if (willOpen) {
      this.open()
    } else if (willClose) {
      this.close()
    }

    const didOpen = !statePrev.toggle && this.state.toggle
    const didClose = statePrev.toggle && !this.state.toggle

    if (didOpen) {
      this.enter()
    }
    else if (didClose) {
      this.exit()
    }
  }

xxx avatar Dec 11 '19 22:12 xxx

Please merge

Serginyo90 avatar Jan 14 '20 12:01 Serginyo90

@xxx Is this going to get a release?

stclairdaniel avatar May 15 '20 17:05 stclairdaniel

@xxx will this be merged soon?

pinkynrg avatar Sep 14 '20 10:09 pinkynrg

@xxx will this be merged soon?

+1

jmansor avatar Oct 23 '20 21:10 jmansor

Any news about this? Thx

edraghiciu-vks avatar Apr 29 '22 13:04 edraghiciu-vks