Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

Android: the return of method "getRealView" in WXScroller should be 'mRealView' #1989

Closed
3 tasks
or0fun opened this issue Jan 3, 2019 · 1 comment
Closed
3 tasks

Comments

@or0fun
Copy link

or0fun commented Jan 3, 2019

Describe the bug

The return of method "getRealView" in WXScroller should be 'mRealView', which is mScrollerView now.
When I reduce the children of scroller view, it has no effect now.

To Reproduce

<template>
  <div class="wrapper">
    <scroller class="scroller" v-for="(row) in rows" scroll-direction="horizontal">
      <text>{{row.length}}</text>
      <div v-for="(item, index) in row" class="item">
        <text>{{index + item.name}}</text>
      </div>
    </scroller>
    <div @click="changeData" class="button">
      <text>点击</text>
    </div>
  </div>
</template>

I reduces item of row in function 'changeData', the length of row changed, but the number of children which displayed didn't change.

Environment

  • Device: Vivo X9
  • OS: Android
  • Version 7.1.2
  • Build from source no

Expected behavior

The number of children in Scroller view should be reduces on the screen when I reduces the number of items.

Screenshots

Additional context

Add any other context about the problem here.

@gubaojian
Copy link
Member

you can add one more div in scroller root. which can avoid the bug. the bug has been fixed in the pull request: #2005

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

No branches or pull requests

2 participants