Giter Club home page Giter Club logo

vue-stack-grid's People

Contributors

0xch4z avatar dependabot[bot] avatar wouterflorijn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

vue-stack-grid's Issues

Horizontal scrollbar is visible on page refresh

I noticed when I refresh the page, I can see a horizontal scrollbar. However, if I resize the browser window it goes away and recalculates the grid items correctly again.

I can easily add an overflow-y: hidden to remove but it's not really a solution as the right side items will be cutoff and not fully shown.

I also tried adding:

ref="stacker"

and then a button to call a method:

<b-button @click="reflow">reflow</b-button>

reflow() {
     this.$refs.stacker.reflow()
 }

which does work but adding it to mounted to do it automatically doesn't seem to do anything.

Is there any workaround or fix to remedy this situation?

[Request] a manually update like in the react version ?

Hello !
I'm in the case where i need to manually update the grid.
I've quickly check and it doesn't seem that you've implemented the feature yet and it's not listed in the Future plans section.
Could you implement it ?
Thanks a lot ๐Ÿ˜‰

stack is not working on SSR production, not render stack to div (Nuxt.js)

Follow #11 @guastallaigor

in plugins/vue-stack-grid.js

import Vue from 'vue'
import { Stack, StackItem } from 'vue-stack-grid'

Vue.component('Stack', Stack)
Vue.component('StackItem', StackItem)

And then, in your nuxt.config.js you import it, and set the mode: 'client'.

plugins: [
    { src: '~/plugins/vue-stack-grid', mode: 'client' }
  ]

testing on index.vue

        <v-flex d-flex>
          <Stack :monitor-images-loaded="true" :column-min-width="320" :gutter-width="8" :gutter-height="8">
            <StackItem v-for="i in 100" :key="i">
              <img src="https://i.imgur.com/0ui5ltX.jpg" />
            </StackItem>
          </Stack>
        </v-flex>

After build:
image

Item on other item

Hello, I have a problem, when I reload the page, my cards is on the previous cards. But when I resize my screen, the cards go at the good place.
Thanks
cards
cards2

Vue 3 Compatibility

Hi, I recently upgraded my Vue version to 3. How can I use this package with Vue3? Or any alternate package for Vue3?

monitor-image-loaded doesn't work, when we use a slot.

Monitor-image-loaded doesn't work with slots.

    <stack :column-min-width="320" ref="stack" :gutter-width="22" :gutter-height="22" monitor-images-loaded style="transition: transform 300ms" @scroll.native.passive="onUserScrollBottom">
      <stack-item v-for="(item, i) in items" :key="i" style="transition: transform 300ms">
        <slot name="item" :page="page" :item="item" :index="i" />
      </stack-item>
    </stack>

Need to remove listener when component is destroyed

You add a resize listener when the component is mounted. But you're not removing it when the component is destroyed. This causes javascript to fire errors if you unmount the component (i.e. switch sections or something in your app).

The actual error (once the component is destroyed):
Stack.vue?cbef:48 Uncaught TypeError: Cannot read property 'clientWidth' of undefined

Adding this to the component should resolve this issue:
destroyed () { window.removeEventListener('resize', this.reflow) }

Error: "Cannot use import statement outside a module" ( Nuxt.js )

Getting this error when using Nuxt.js.

The component is wrapped in a client-only tag to avoid any SSR issues.

<client-only></client-only>

Error screenshot:

89a45a1dd4dad4dc50c44bc97d03fc28

Implementation:

In component

<Stack :monitor-images-loaded="true" :column-min-width="320" :gutter-width="8" :gutter-height="8">
        <StackItem v-for="i in 100" :key="i">
                <img src="https://i.imgur.com/0ui5ltX.jpg" />
        </StackItem>
</Stack>

Component registration

import { Stack, StackItem } from 'vue-stack-grid'
export default {
    components: { Stack, StackItem },
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.