Files
react-native/ReactCommon/react/renderer/components/picker/iospicker/PickerEventEmitter.h
T
Peter ArganyandFacebook GitHub Bot 251d5e1bbe Fabric Picker onChange event
Summary:
Implements `onChange` prop for `<Picker/>`.

Changelog: [iOS][Fabric] Fabric Picker support

Reviewed By: sammy-SC

Differential Revision: D23975689

fbshipit-source-id: 7aa81c203d420a8971e4309911a41ecfd377a318
2020-10-13 11:19:29 -07:00

29 lines
594 B
C++

/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
#include <react/renderer/components/view/ViewEventEmitter.h>
namespace facebook {
namespace react {
class PickerEventEmitter : public ViewEventEmitter {
public:
using ViewEventEmitter::ViewEventEmitter;
struct PickerIOSChangeEvent {
std::string newValue;
int newIndex;
};
void onChange(PickerIOSChangeEvent event) const;
};
} // namespace react
} // namespace facebook