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

Having some trouble #76

Closed
acomito opened this issue Nov 19, 2016 · 18 comments
Closed

Having some trouble #76

acomito opened this issue Nov 19, 2016 · 18 comments

Comments

@acomito
Copy link

acomito commented Nov 19, 2016

I'm running into a few issues. Have you tested the package since upgrading to the new material-ui?

mui/material-ui#5573

@puranjayjain
Copy link
Owner

@acomito not yet, was planning to launch it with the last remaining feature added.

@acomito
Copy link
Author

acomito commented Nov 19, 2016

Okay. If I come up with anything helpful I'll report back. Great looking package even if I can't get it working just yet!

@acomito acomito closed this as completed Nov 19, 2016
@puranjayjain
Copy link
Owner

@acomito haha thank you. Hope you get it working soon. Feel free to ask again if you have any questions or problems.

@acomito
Copy link
Author

acomito commented Dec 24, 2016

Tried to use this package again today but no luck. So are the steps to integrating it with a material-ui project anything more than installing from npm and calling:

ReactMaterialUiNotifications.showNotification({
      title: 'Title',
      additionalText: `Some message to be displayed`,
      overflowText: "[email protected]",
      icon: <Message />,
    });

Or do I need to put the <ReactMaterialUiNotifications /> component in my root component?

I tried both ways and am not seeing anything (no error message either)

@puranjayjain
Copy link
Owner

Yes you need to call it and also put that in the react tree preferably as the root component or somewhere else in the tree.

@puranjayjain
Copy link
Owner

@puranjayjain
Copy link
Owner

Feel free to reopen this issue if you have any problems.

@acomito
Copy link
Author

acomito commented Dec 25, 2016

Where do have you been putting it in projects using react-router? Do you need something like redux at that point or is the object available globally?

@puranjayjain
Copy link
Owner

It's not available globally you might need to pass that reference using an event emitter pattern or something equivalent, I haven't had the chance to explore redux at the moment.

@irrvrsl
Copy link

irrvrsl commented Jan 6, 2017

Same problem here: i can't get notifications. I've took code(<ReactMaterialUiNotifications> and method calling) from Main.js of the project and nothing happens.

@tiagowippel
Copy link

Hi, same problem here.. using React Router

@akashihi
Copy link

Same problem. No router, have on the page. Notifications are not shown.

@puranjayjain
Copy link
Owner

@tiagowippel @akashihi can you give me the link to the place in the project where it is being implemented if it is open source.

@puranjayjain puranjayjain reopened this Apr 29, 2017
@puranjayjain
Copy link
Owner

So @akashihi the problem seems to be that the show notifications is not being called in the same component the element is hoisted in. You can either move the showNotification call to Notification.js or create a ref to the notification.js's ReactMaterialUiNotifications component and trigger an action on that ref.

@akashihi
Copy link

akashihi commented May 3, 2017

@puranjayjain Well, i'm pretty new to the Js/React world. Could you please provide some intuition, how to implement that ref? Thanks in advance.

@DevAlien
Copy link

It does not work because you have to call a setState or forceUpdate on your own, if not the notifications will not be updated

@puranjayjain
Copy link
Owner

@DevAlien @akashihi this issue has been fixed in v0.5.0 and released on npm also!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants