Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The size adjustment breaks when parent container has the flex-grow property #270

Open
Yaspeace opened this issue Feb 12, 2023 · 1 comment

Comments

@Yaspeace
Copy link

I have written some test component that shows incorrect behaviour:

<template>
  <div class="test-wrapper">
    <div style="background-color: blue;">
      Test1
    </div>
    <div style="flex-grow: 1;">
      <VueSlickCarousel style="background-color: red;">
        <div v-for="i in 10" :key="i" style="width: 30px;">SomeText{{ i }}</div>
      </VueSlickCarousel>
    </div>
  </div>
</template>

<script>
import VueSlickCarousel from 'vue-slick-carousel'

export default {
  name: "TestView",
  components: {
    VueSlickCarousel,
  },
}
</script>

<style scoped>
.test-wrapper {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}
</style>

And got such result:
image

@Aybee5
Copy link

Aybee5 commented Mar 8, 2023

I just experienced something similar, my scenario, is I am using it inside flex without even using flex-grow, I was able to make it work by setting overflow: auto on the div surrounding the carousel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants