Skip to content

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

@PiNengShaoNian

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事件

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions