fuxingloh / vue-masonry-wall

A pure vue responsive masonry layout without direct dom manipulation and ssr support.
https://nuxt-app.fuxing.dev/vue-masonry-wall
MIT License
211 stars 31 forks source link

Uncaught TypeError: Cannot read property 'getBoundingClientRect' of undefined #31

Open RobSteward opened 3 years ago

RobSteward commented 3 years ago

I'm using the wall to display a custom card component like so:

<div v-else>
      <v-row dense>
        <vue-masonry-wall
          :items="rules"
          :options="masonryOptions"
          :ssr="{ columns: 3 }"
        >
          <template v-slot:default="{ item }">
            <LazyRuleCard :rule="item" />
          </template>
        </vue-masonry-wall>
      </v-row>
    </div>
* masonryOptions is returned from data like so 
```javascript
 masonryOptions: {
        width: 300,
        padding: {
          default: 12,
          1: 6,
          2: 8,
        },
      },

While the rules are displayed, I get this error in console. What am I doing wrong? Seems like this gets called for each of the 7 test rules that I have. image image

RobSteward commented 3 years ago

@fuxingloh Just to check - is this something your still actively developing or should I look for other packages?

fuxingloh commented 3 years ago

@fuxingloh Just to check - is this something your still actively developing or should I look for other packages?

I am so sorry @RobSteward, you should look for other packages if this does not fit your use case. I am little busy with my day job now.

RobSteward commented 3 years ago

Hi, No worries at all - I will look around. I wast just wondering if it makes sense to wait :) Good attempt though, I did like the approach.