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

    Set default tooltip properties using UMD

    Help
    2
    4
    198
    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.
    • rubs
      rubs last edited by

      I’m looking for a way to set default tooltip properties using UMD. When using the CLI version I do it as follows:

      import { QTooltip } from 'quasar';
      QTooltip.options.props.delay.default = 550;
      

      Now I have a UMD project and I want to do the same. However there is no equivalent of this.$q.notify.setDefaults(...) (which I use to set Notify defaults) because there is no this.$q.tooltip object. How to do it?

      P.S. I think a similar issue was raised here but it was closed soon afterwards.

      metalsadman 1 Reply Last reply Reply Quote 0
      • metalsadman
        metalsadman @rubs last edited by metalsadman

        @rubs UMD exposes a Quasar object, console log that. It should be there. https://quasar.dev/start/umd#Quasar-Global-Object

        In the GitHub issues you mentioned, as answered there, you can wrap the components or use extend and set the props you want to change its defaults.

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

          Great answer, thanks for the quick solution.

          rubs 1 Reply Last reply Reply Quote 0
          • rubs
            rubs @rubs last edited by rubs

            Thanks to your tip, here’s the resulting code, complete with Intellisense:

            /** @type {quasar.QTooltip} */
            const tooltipProps = QTooltip.options.props;
            tooltipProps.delay.default = 550;
            
            1 Reply Last reply Reply Quote 0
            • First post
              Last post