Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replacing the whole template for a notification doesn't work #14

Closed
WildChild85 opened this issue Sep 1, 2021 · 5 comments · Fixed by #15
Closed

Replacing the whole template for a notification doesn't work #14

WildChild85 opened this issue Sep 1, 2021 · 5 comments · Fixed by #15

Comments

@WildChild85
Copy link

Describe the bug
Like the title says customizing the whole template doesn't work anymore. The attributes slot and slot-scope are deprecated. Please update the documentation.

@kyvg kyvg mentioned this issue Sep 3, 2021
@kyvg kyvg closed this as completed in #15 Sep 3, 2021
@Shadercloud
Copy link

When I use the example in the read me the template does not work:

  <template #body="props">
    <div class="my-notification">
      <p class="title">
        {{ item.title }}
      </p>
      <button class="close" @click="close">
        <i class="fa fa-fw fa-close"></i>
      </button>
      <div v-html="props.item.text"/>
    </div>
  </template>
</notifications>

It gives this error:
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'title')

Then if i remove the {{ item.title }} to get it work the @click="close" also does not work to close the box.

@Blakeinstein
Copy link

Then if i remove the {{ item.title }} to get it work the @click="close" also does not work to close the box.

the example is incorrect. use {{ props.item.title }} and @click="props.close"

@kyvg
Copy link
Owner

kyvg commented Feb 21, 2022

Updated readme here 16fe4a8

@Blakeinstein
Copy link

Updated readme here 16fe4a8

still missing props.close instead of close

@StounhandJ
Copy link

@click="props.close" it was never corrected to the correct version in the documentation

kyvg added a commit that referenced this issue May 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants