No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    The alerts do not disappear

    Framework
    2
    3
    1010
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • E
      emartinezpinzon last edited by

      Hello everyone, I am launching alerts from JavaScript depending on the response from a server to which I make a request, as each response I throw a different alert and I need this alert to only spend some time on the air and then disappear.

      As I read in the documentation there is the property duration, but I use it and when testing the alert it remains there only until I close it, but it is not exactly what I need.

      I create the alerts as follows:
      0_1516357114074_d053ccc7-75a5-4a57-9099-147b7e26b199-image.png

      I would expect that after the alert appeared, it would remain on the screen for five seconds and then disappear, but this does not happen.

      Thanks for reading, I hope someone can help me

      1 Reply Last reply Reply Quote 0
      • benoitranque
        benoitranque last edited by

        Hello!

        Per the docs, duration determines the time it takes to transition, not how long the alert should stay open. Either use setTimeout() or use Toast

        1 Reply Last reply Reply Quote 0
        • E
          emartinezpinzon last edited by emartinezpinzon

          I solved this using the setTimeout method as you recommend me in the following way.

          0_1516742923634_8d4385be-cda8-4b0e-85f5-b1d7798e8c59-image.png

          It works in the following way

          Gif in imgur

          Thanks, I think this could be in the documentation. no matter how simple it is, it would help more than one.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post