Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update toast draggable to true does nothing #192

Closed
LouisCuvelier opened this issue Jun 6, 2018 · 3 comments
Closed

Update toast draggable to true does nothing #192

LouisCuvelier opened this issue Jun 6, 2018 · 3 comments
Assignees
Labels

Comments

@LouisCuvelier
Copy link

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 draggable set to true.

Is that a bug ?
Thanks for your help !

@fkhadra fkhadra self-assigned this Jun 6, 2018
@fkhadra fkhadra added the bug label Jun 6, 2018
@fkhadra
Copy link
Owner

fkhadra commented Jun 6, 2018

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

fkhadra added a commit that referenced this issue Jun 7, 2018
@fkhadra
Copy link
Owner

fkhadra commented Jun 7, 2018

@LouisCuvelier I published the fix

@fkhadra fkhadra closed this as completed Jun 7, 2018
@LouisCuvelier
Copy link
Author

Thank you @fkhadra for this reactivity !

vasiliydolmatov pushed a commit to vasiliydolmatov/react-toastify that referenced this issue Apr 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants