Closed SkyJedi closed 7 years ago
Thanks, that's due to an update in React. You should still be able to use the package though. I will see if I can manage to work on a patch during the day. I'll let you know when it's up.
I thought so. I did get the popups working with your stylesheets, now to get a form working in the popup. Thanks for this awesome module!
Nice! I'm glad you like it!
@SkyJedi if you use react-form
you will have to use ref
property
let form;
const submitFunction = () => {
if (form && typeof form.submitForm === 'function') {
form.submitForm();
}
};
const formComponent = (
<Form
ref={(el) => { if (el) { form = el; } }}
onSuccess={() => {
Popup.close();
}}
/>
);
Popup.create({
title: `Form`,
content: formComponent,
className: 'alert',
buttons: {
right: [
{
text: 'Cancel',
className: 'danger',
action: Popup.close,
},
{
text: 'Add',
className: 'success',
action: submitFunction,
},
],
},
});
The warnings should now be gone in the latest release (0.8.0)
Thanks for the fix!
I'm still getting 0.7.1 on npm install react-popup
On a new install? Strange. Or maybe you have it in your package.json with 0.7.1?
Thanks! that was the issue. Totally me, youre awesome
Hehe no problem, glad it works now!
I'm getting these errors when i load in my project
warning.js:36 Warning: PopupHeader: React.createClass is deprecated and will be removed in version 16. Use plain JavaScript classes instead. If you're not yet ready to migrate, create-react-class is available on npm as a drop-in replacement.
warning.js:36 Warning: Accessing PropTypes via the main React package is deprecated. Use the prop-types package from npm instead.