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

Picker 组件 multiSelector 类型 下 无法动态设置 range。不触发onColumnChange事件 #8710

Open
Yana5417 opened this issue Feb 22, 2021 · 4 comments
Labels
F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x

Comments

@Yana5417
Copy link

相关平台

微信小程序

复现仓库

https://github.com/Yana5417/taro-react.git
小程序基础库: 2.15.0
使用框架: React

复现步骤

1、点击“请选择省市区”;
2、选择省市区的第一列省;
3、可看到打印内容,range数组已更新,但第二、第三列数据并未重新渲染;

期望结果

在 column 切换时触发onColumnChange事件,修改 range

实际结果

在 column 切换时触发onColumnChange事件,并未修改 range

环境信息

 Taro CLI 3.0.21 environment info:
    System:
      OS: macOS 10.15.7
      Shell: 5.7.1 - /bin/zsh
    Binaries:
      Node: 12.20.0 - ~/.nvm/versions/node/v12.20.0/bin/node
      Yarn: 1.22.10 - /usr/local/bin/yarn
      npm: 6.14.8 - ~/.nvm/versions/node/v12.20.0/bin/npm
    npmPackages:
      @tarojs/components: 3.0.21 => 3.0.21
      @tarojs/mini-runner: 3.0.21 => 3.0.21
      @tarojs/react: 3.0.21 => 3.0.21
      @tarojs/runtime: 3.0.21 => 3.0.21
      @tarojs/taro: 3.0.21 => 3.0.21
      @tarojs/webpack-runner: 3.0.21 => 3.0.21
      babel-preset-taro: 3.0.21 => 3.0.21
      eslint-config-taro: 3.0.21 => 3.0.21
      react: ^16.10.0 => 16.14.0
@taro-bot2 taro-bot2 bot added F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x labels Feb 22, 2021
@yz1311
Copy link

yz1311 commented Mar 12, 2021

我也碰到这个问题了,也是封装省市区组件😂 最新版3.1.2

@yz1311
Copy link

yz1311 commented Mar 17, 2021

@Chen-jj 能不能帮忙看下这个问题?

@Yana5417
Copy link
Author

我也碰到这个问题了,也是封装省市区组件😂 最新版3.1.2

可以先使用splice替换数组的方式先解决掉

@x1aodingdang
Copy link

深拷贝一下就好

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-react Framework - React T-weapp Target - 编译到微信小程序 V-3 Version - 3.x
Projects
None yet
Development

No branches or pull requests

3 participants