Skip to content

Unexpected infinity scroll-X #29

Open
@FreakyHead

Description

@FreakyHead

Hello, while x-scrolling got infinity scrolling and error in the console.

Tab in Tabs can be added and removed.
If I set the last tab is Active, the scroll width will be normal

<div class="flex">
      <vue-custom-scrollbar
        :settings="{ wheelPropagation: true }"
        tagname="div"
        class="flex overflow-x-scroll rounded-tl relative"
      >
        <div
          v-for="(tab, index) in tabs"
          :key="index"
          style="max-width: 200px;"
          :class="[
            'relative p-3',
            index === 0 ? 'rounded-tl' : '',
            tab.isActive ? 'bg-white' : 'bg-light-disabled',
          ]"
        >
          <h4
            @click="setActive(index)"
            class="cursor-pointer font-semibold text-md text-default"
          >
            ОСАГО
          </h4>
          <img
            v-if="tabs.length > 1"
            @click="removeTab(index)"
            :src="require('@/assets/icons/close.svg')"
            alt="Закрыть вкладку"
            class="absolute cursor-pointer"
            style="top: 10px; right: 10px;"
          />
          <p
            class="text-sm text-hint truncate"
            :title="tab.car.model ? tab.car.model : 'Новый расчет'"
          >
            {{ tab.car.model ? tab.car.model : 'Новый расчет' }}
          </p>
        </div>
      </vue-custom-scrollbar>

image

Details:

"vue": "^2.6.11",
"vue-custom-scrollbar": "^1.3.0"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions