react-notification-system icon indicating copy to clipboard operation
react-notification-system copied to clipboard

fixed height set on notification with varying height content

Open cdaringe opened this issue 8 years ago • 3 comments

problem statement

  • notification div has a pixel spec height. i have a button in my notification that expands content of the notification. on expansion, there is overflow

example

in the below example, i've expanded some content by clicking "show details" (now showing "Hide Details"), and you can see an unhandled error stacktrace. I expected the notification to wrap its child content. in the dev tools, you can clearly see an inline style height specified.

screen shot 2016-12-27 at 10 55 58 am

cdaringe avatar Dec 27 '16 18:12 cdaringe

here is the offending line: https://github.com/igorprado/react-notification-system/blob/master/src/NotificationItem.jsx#L193. it would be great to have that not specify a height: <some-value>px k-v pair.

there's another offending line, which were it solved, would probably also mitigate my issue, but still leave me vulnerable to the same failure mode.

render tests for overrideStyle, which is always defined, even if i didn't specify any style overrides. this should be null or undefined. because of this, it enters into the first offending line, described above.

cdaringe avatar Dec 27 '16 20:12 cdaringe

Have the same issue, We have a multi-lang site, and when the user changes the locale, the NotificationItem height does not changed, Tried to override it with height:auto, but its get overridden as described by @cdaringe

rotem925 avatar Feb 08 '17 05:02 rotem925

can you guys provide a working example of this?

igorprado avatar Mar 13 '17 21:03 igorprado