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

Problem with $slotOptions and dwonload button #9

Open
heitara opened this issue Apr 19, 2020 · 2 comments
Open

Problem with $slotOptions and dwonload button #9

heitara opened this issue Apr 19, 2020 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@heitara
Copy link

heitara commented Apr 19, 2020

Hello,

I had some problem with the most recent version - "vue-xlsx": "^0.2.1"
The Download button is not appearing. I've updated the render function with this new one and it seems to be working.

render(h) {
    if (this.$slots.default && this.loaded) {
      return h(
        "div",
        {
          on: {
            click: this.disableWrapperClick ? () => {} : this.download
          }
        },
        [
          this.$slots.default
        ]
      );
    }
    return null;
  }

Here is the old function for comparison:

  render(h) {
    if (this.$scopedSlots.default && this.loaded) {
      return h(
        "div",
        {
          on: {
            click: this.disableWrapperClick ? () => {} : this.download
          }
        },
        [
          this.$scopedSlots.default({
            download: this.download
          })
        ]
      );
    }
    return null;
  }

I'm not sure why $scopedSlots. is undefined. Could you please adjust the code, so it works fine on Vue@2.5.17?

@DonNicoJs
Copy link
Owner

@heitara Thank you for the issue, I will take a look ASAP!

@DonNicoJs DonNicoJs added the bug Something isn't working label Apr 26, 2020
@DonNicoJs DonNicoJs self-assigned this Apr 26, 2020
@heitara
Copy link
Author

heitara commented Apr 26, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants