hernansartorio / hernansartorio/react-nice-dates

Styles not being applied when component is inside a collapsible element

Open
#37 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
1.1k
Forks
77
PR merge metrics
No merged PRs in 30d

Description

Hi, great lib! It is helping me very much.

I notice that, when the `` or `` is placed inside a collapsible element which in the first render has a `display: none;`, it doesn't render correctly.

[Here is the reproduced example in codesandbox](https://codesandbox.io/s/react-nice-dates-bug-collapse-mno8d?file=/src/Example.js:427-437)

Going further, [comparing](https://www.diffchecker.com/PuDLODta) with the rendered element in the docs, I see that the `wide` class is not applied to `.nice-dates-day` and `.nice-dates-grid` is rendered with `height: 6px`.

Perhaps this happens because the initial width of the `ref` element is 0 and by that it can't render correctly?

I can open a PR setting a mininum height for `.nice-dates-day` and `.nice-dates-grid` but I'd like to discuss it here before to check if this is the best option available.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.