jemise111 / react-native-swipe-list-view

A React Native ListView component with rows that swipe open and closed
https://www.npmjs.com/package/react-native-swipe-list-view
MIT License
2.78k stars 528 forks source link

java.lang.ClassCastException: java.lang.Double cannot be cast to java.lang.String #601

Closed deflexable closed 2 years ago

deflexable commented 2 years ago

Your issue may already be reported! Please search on the issue tracker before creating one.

Describe the bug SwipeListView throw a ClassCastException on react-native 0.68.2 but works on react-native 0.64.2

To Reproduce


        <SwipeListView
          data={userChatList}
          keyExtractor={item => item.key}
          renderItem={(data, rowMap) =>
            data.item.personalChat
              ? <MessageListItem
                onLongPress={() => rowMap[data.item.key].manuallySwipeRow(-120)}
                moreActionOnPress={() => rowMap[data.item.key].closeRow()}
                key={data.index}
                currentUserId={this.currentUserId}
                itemData={data.item} />
              : <GroupMessageListItem
                onLongPress={() => rowMap[data.item.key].manuallySwipeRow(-120)}
                moreActionOnPress={() => rowMap[data.item.key].closeRow()}
                key={data.index}
                currentUserId={this.currentUserId}
                itemData={data.item}
              />
          }
          rightOpenValue={-125}
          disableRightSwipe={true}
          renderHiddenItem={this._renderMessagesListItemSwipeLeft}
          onEndReachedThreshold={0.5}
          onMomentumScrollBegin={() => { this.onEndReachedCalledDuringMomentum = false }}
          onEndReached={() => {

          }}
          onRefresh={() => this.setState({ isRefreshing: true })}
          refreshing={isRefreshing}
          refreshControl={
            <RefreshControl
              refreshing={isRefreshing}
              onRefresh={() => this.queryChats()}
              size={10}
            />
          }
        />

Screenshots If applicable, add screenshots to help explain your problem.

Android Logcat Error Logs

android-logcat

Emulator Error

Emulator Error

Environment (please complete the following information):

deflexable commented 2 years ago

after poke nosing into the code, i discover that the error comes from RefreshControl element. The size props is a string value of either 'default' or 'large'