vuematerial / vue-material

Vue.js Framework - ready-to-use Vue components with Material Design, free forever.
https://www.creative-tim.com/vuematerial
MIT License
9.88k stars 1.16k forks source link

<md-file> 'badInput' of undefined #2260

Open ashtonfei opened 3 years ago

ashtonfei commented 3 years ago
vue:634 
[Vue warn]: Error in nextTick: "TypeError: Cannot read property 'badInput' of undefined"
found in
---> <MdFile>
       <MdField>
         <Root>

vue:1897 
TypeError: Cannot read property 'badInput' of undefined
    at VueComponent.isInvalidValue (vue-material:6)
    at VueComponent.<anonymous> (vue-material:6)
    at Array.<anonymous> (vue:1989)
    at flushCallbacks (vue:1915)

image

My code snippet

<!doctype html>
<html>
  <head>
    <meta charset="utf-8">
    <meta content="width=device-width,initial-scale=1,minimal-ui" name="viewport">
    <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700,400italic|Material+Icons">
    <link rel="stylesheet" href="https://unpkg.com/vue-material/dist/vue-material.min.css">
    <link rel="stylesheet" href="https://unpkg.com/vue-material/dist/theme/default.css">
  </head>

  <body>
    <div id="app">
        <md-field>
            <label>Upload files</label>
            <md-file v-model="file" placeholder="A nice input placeholder" />
        </md-field>
    </div>

    <script src="https://unpkg.com/vue"></script>
    <script src="https://unpkg.com/vue-material"></script>
    <script>
      Vue.use(VueMaterial.default)

      new Vue({
        el: '#app',
        data: {
            file: null
        },
      })
    </script>
  </body>
</html>
vellons commented 3 years ago

That is also happening to me while changing the value of a md-select.

<md-field>
    <md-select v-model="country" name="country" id="country" placeholder="Country">
        <md-option value="italy">Italy</md-option>
        <md-option value="australia">Australia</md-option>
        <md-option value="japan">Japan</md-option>
        <md-option value="united-states">United States</md-option>
    </md-select>
</md-field>

I think that the error was introduced in this merge #2108 in 1.0.0-beta-15 release.

sarah-tammenga-ibis commented 3 years ago

I am also having this error at every select in my application.

ghadjigeorghiou commented 3 years ago

I have the same issue. It doesn't impact the functionality of my app but it would be good to get it fixed. It seems like a fix was approved and passed the checks in #2262 but it hasn't been merged yet. Can anyone give us an update on the issue?

sloopsight commented 3 years ago

Is this project is dead? 3 months old fix yet not merge?

Undianer commented 1 year ago

still no update? Seems dead to me