Skip to content

Props not taking effect on Toast. #10

@johnRivs

Description

@johnRivs

I decided to use the Toast component, but because I'm using browserify, I had to put the files together myself. I chose to use .vue files and it worked fine.

However, I ended up looking at the code and noticed how props dont actually take effect when the Toast is triggered:

  1. An event (show::toast) gets triggered with some options.
  2. addToQueue(options) gets called.
  3. show(options) gets called.
  4. show() overrides the props with these options, but if there are none, instead of using the props it will use some defaults.

So basically, instead of

this.duration = options.duration || this.duration;

the component does

this.duration = options.duration || DURATION;

Which means, <vs-toast :duration="1000"></vs-toast> is doing nothing. It's still 6 seconds by default.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions