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

    [solved] I changed a prop type but getting mismatch error

    Help
    2
    7
    154
    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.
    • R
      rconstantine last edited by rconstantine

      Hey folks, I have a PWA and on one ‘page’ a component where I was previously passing in a string, but changed it to pass in a number. I updated the props definition in the component after I realized I forgot to, but I still get an error saying:
      “Invalid prop: type check failed for prop “crcl”. Expected String with value “57.3325”, got Number with value 57.3325.”

      The prop says:
          crcl: {
            type: Number
          },
      

      Am I forgetting something else too?

      OR— is my dev version not compiling correctly? Where do compiled dev files live, anyway?

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

        @rconstantine put : in front of where you are passing the value and it must be in quotes

        :my-prop="57.3325"
        
        1 Reply Last reply Reply Quote 0
        • R
          rconstantine last edited by

          I think I’m doing that:

          :crcl="estCrCl"
          

          Where estCrCl = 57.3325 as a number.

          1 Reply Last reply Reply Quote 0
          • R
            rconstantine last edited by

            I have others in the same component definition that are working like this pair:

            patAge: {
                  type: Number
                },
            
            :pat-age="selectedPat.age"
            
            1 Reply Last reply Reply Quote 0
            • R
              rconstantine last edited by

              I suppose the question is: why does it say it expected a string? My definition says number.

              1 Reply Last reply Reply Quote 0
              • R
                rconstantine last edited by

                Holy crap! The issue was my IDE stopped saving my changes!!! I closed it at the end of the work day yesterday and opened it today and all my changes are gone! I started making them over again, including the above, and it works just fine. Never had that happen before with WebStorm. Weird.

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

                  That is really weird!
                  Glad you resolved it.

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