Closed adrienharnay closed 4 years ago
@Zephir77167 - Sorry about this. I should have bumped to a new major version b/c the PR's I merged in seem to have broken things for people. Can you post how you are using the component?
I recently pulled in someone's code that changed this line: https://github.com/skratchdot/react-bootstrap-daterangepicker/blob/master/lib/index.js#L154
That means that the DateRangePicker
picker component always needs to be called with 1 single child now.
Works:
<DateRangePicker>
<div>One child</div>
</DateRangePicker>
Fails (I think):
<DateRangePicker>
<div>child 1</div>
<div>child 2</div>
</DateRangePicker>
Not sure if this is related to the issue you are seeing.
Thanks for the quick answer!
I am using it like so:
<BootstrapDateRangePicker
...
>
<Input
...
/>
</BootstrapDateRangePicker>
Input being:
const Input = ({ className, ...otherProps }) => (
<input className={className ? `${styles.input} ${className}` : styles.input} {...otherProps} />
);
So no multiple children here
I'm downgrading for now as this is quite breaking. Don't hesitate to ask if you need more information to help resolve the problem!
Hey @skratchdot, thanks for the project.
I should have bumped to a new major version b/c the PR's I merged in seem to have broken things for people.
Agreed here. Was also affected by this. Perhaps a good course of action right now would be to revert 3.4 to 3.3.x code and move the breaking changes to 4.x? Also the necessity of new peerDependencies should maybe justify the major version bump on its own.
Just a few thoughts, let me know if I can be of any help.
Hi, any news on this? 3.4.0 doesn't work for me as stated in previous comments.
I just wrapped my component into another div, does the trick
closing this due to inactivity. please re-open if this is still an issue in v6.0.0 or greater
Hi,
Since I updated React to the latest version (15.5.4) and also react-bootstrap-daterangepicker (3.4.0), I got this error:
Warning: Stateless function components cannot be given refs (See ref "picker" in Input created by null). Attempts to access this ref will fail.
Stacktrace: (even though looking at the code it is pretty obvious where it coming from).
This error is making all the pages where the component is included crash... Could you please take a look?
Thanks in advance,