svelte-material-ui icon indicating copy to clipboard operation
svelte-material-ui copied to clipboard

Dialog always closes as soon as I click any Button in the Actions component

Open elirov opened this issue 3 years ago • 1 comments

  <Dialog
    bind:open
    aria-labelledby="large-scroll-title"
    aria-describedby="large-scroll-content"
    surface$style="width: 850px; max-width: calc(100vw - 32px); height: 650px"
  >
    <Content>
      Stuff
 </Content>
    <Actions>
      <Button color="default" variant="raised" action="none" on:click$preventDefault="{() => console.log('Hi')}">
        <Label>Save and Apply</Label>
      </Button>
    </Actions>
  </Dialog>

elirov avatar Oct 28 '21 23:10 elirov

Use on:click$stopPropagation for the Actions area buttons

mrmx avatar Apr 05 '22 15:04 mrmx