p-sidebar dimissable flag is not re-evaluated when its value changes #7157
Labels
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
Milestone
I'm submitting a ... (check one with "x")
Plunkr Case (Bug Reports)
https://stackblitz.com/edit/github-qbafbn?file=src%2Fapp%2Fapp.component.html
Current behavior
I have a p-sidebar as follow
When
changed
flag is updated, onlycloseIcon
is shown/hidden correspondingly, but value ofdismissible
flag is evaluated only once on initialization.On my given plunkr,
changed = false
on init, thereforedismissible = true,
user can always click outside to close the sidebar, althoughchanged = true
later (on click).Expected behavior
dismissible
flag should be re-evaluated every time its value changed.Minimal reproduction of the problem with instructions
Click
Show/hide sidebar
to open sidebar, then clickToggle changed flag
and click outside to check if the sidebar is dimissible or not.What is the motivation / use case for changing the behavior?
I have sidebar as an edit dialog, it should not be dimissible when user has unsaved changes.
Angular version: 7.2.0
PrimeNG version: 7.0.4
The text was updated successfully, but these errors were encountered: