Growl detail should be placed in <div> not <p> #965
Labels
Type: Enhancement
Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone
I'm submitting a ...
Codesandbox Case (Bug Reports)
https://codesandbox.io/s/primereact-growltest-7zkdf
Just click on the blue button, notice the growl message and the console log error.
Current behavior
Even though the
detail
property ofGrowl
is defined as typeelement
, it is not possible to include<p>
tags in the element without generating console errors. This appears to be because the Growl component wraps the supplieddetail
in a<p>
itself. Growl should not assumedetail
can be wrapped in anything but a<div>
safely.Expected behavior
The growl message should render without generating a console log error.
Minimal reproduction of the problem with instructions
Ask a
Growl
component to show{severity: 'info', detail: <p>Oops</p>}
. Note the error that appears in the DOM:Warning: validateDOMNesting(...): <p> cannot appear as a descendant of <p>.
.If you inspect the DOM at this point you will see that the growl has wrapped the detail element in a
<p>
.Please tell us about your environment:
macOS 10.14.5
16.8.6
3.1.7
all
Typescript
The text was updated successfully, but these errors were encountered: