🐛 Kan avslutte popup-overlay-vinduet ved å hindre DOM bubbling
https://stackoverflow.com/questions/1369035/how-do-i-prevent-a-parents-onclick-event-from-firing-when-a-child-anchor-is-cli
This commit is contained in:
parent
5200e1c9c6
commit
80b1dfecf0
1 changed files with 3 additions and 1 deletions
|
@ -46,7 +46,9 @@ export const FeilCard = (props: IFeilmelding) => {
|
|||
bg-bg-default border border-border-default p-7 rounded-lg
|
||||
h-1/2 w-1/2
|
||||
">
|
||||
<Button onClick={() => {
|
||||
<Button onClick={(e) => {
|
||||
//hindrer DOM bubbling https://stackoverflow.com/questions/1369035/how-do-i-prevent-a-parents-onclick-event-from-firing-when-a-child-anchor-is-cli
|
||||
e.stopPropagation()
|
||||
setVisFeilinformasjon(false)
|
||||
}}>
|
||||
Avslutt kortvisning
|
||||
|
|
Reference in a new issue