Skip to content

初始化时不会触发onValueChange事件 #235

Description

@PiNengShaoNian

复现代码

function App() {
  const [value, setValue] = useState([]);

  const onChange = value => {
    console.log(value);
    setValue(value);
  };
  return (
    <div className="App">
      <MultiPicker selectedValue={value} onValueChange={onChange}>
        <Picker indicatorClassName="my-picker-indicator">
          <Picker.Item className="my-picker-view-item" value="1">
            one
          </Picker.Item>
        </Picker>
      </MultiPicker>
    </div>
  );
}

期待效果
初始化时触发onValueChange事件

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions