mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: Implements `onChange` prop for `<Picker/>`. Changelog: [iOS][Fabric] Fabric Picker support Reviewed By: sammy-SC Differential Revision: D23975689 fbshipit-source-id: 7aa81c203d420a8971e4309911a41ecfd377a318
29 lines
594 B
C++
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
|