React-toastify: Update toast draggable to true does nothing

Created on 6 Jun 2018  路  3Comments  路  Source: fkhadra/react-toastify

Hi,

Thanks for this lib !

I'm experiencing a weird problem when I want to update a toast that was created with draggable: false

Here's my code to update the toast :

toast.update(toastId, {
  render: `I'm updated`,
  type: toast.TYPE.SUCCESS,
  autoClose: true,
  closeButton: true,
  closeOnClick: true,
  draggable: true
 });

Everything works perfectly except for the draggable. The toast can't be drag even with draggableset to true.

Is that a bug ?
Thanks for your help !

bug

All 3 comments

Hello @LouisCuvelier,

You just spotted a bug well done 馃憣.

For the draggable props, I bound the events inside componentDidMount but in the case of an update componentDidMount is not called. This is why the draggable props is not working.

I'll work on a fix.

Thanks

@LouisCuvelier I published the fix

Thank you @fkhadra for this reactivity !

Was this page helpful?
0 / 5 - 0 ratings

Related issues

prmichaelsen picture prmichaelsen  路  5Comments

albert-olive picture albert-olive  路  5Comments

jorgecuesta picture jorgecuesta  路  5Comments

fkhadra picture fkhadra  路  3Comments

billtlee picture billtlee  路  5Comments