-
Notifications
You must be signed in to change notification settings - Fork 66
Expand file tree
/
Copy pathEnrichedTextInputViewShadowNode.h
More file actions
42 lines (35 loc) · 1.55 KB
/
Copy pathEnrichedTextInputViewShadowNode.h
File metadata and controls
42 lines (35 loc) · 1.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#pragma once
#include <ReactNativeEnriched/EventEmitters.h>
#include <ReactNativeEnriched/Props.h>
#include <ReactNativeEnriched/EnrichedTextInputViewState.h>
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
#include <react/renderer/core/LayoutConstraints.h>
#include <jsi/jsi.h>
namespace facebook::react {
JSI_EXPORT extern const char EnrichedTextInputViewComponentName[];
/*
* `ShadowNode` for <EnrichedTextInputView> component.
*/
class EnrichedTextInputViewShadowNode : public ConcreteViewShadowNode<
EnrichedTextInputViewComponentName,
EnrichedTextInputViewProps,
EnrichedTextInputViewEventEmitter,
EnrichedTextInputViewState> {
public:
using ConcreteViewShadowNode::ConcreteViewShadowNode;
EnrichedTextInputViewShadowNode(const ShadowNodeFragment& fragment, const ShadowNodeFamily::Shared& family, ShadowNodeTraits traits);
EnrichedTextInputViewShadowNode(const ShadowNode& sourceShadowNode, const ShadowNodeFragment& fragment);
void dirtyLayoutIfNeeded();
Size measureContent(const LayoutContext& layoutContext, const LayoutConstraints& layoutConstraints) const override;
static ShadowNodeTraits BaseTraits() {
auto traits = ConcreteViewShadowNode::BaseTraits();
traits.set(ShadowNodeTraits::Trait::LeafYogaNode);
traits.set(ShadowNodeTraits::Trait::MeasurableYogaNode);
return traits;
}
private:
int localForceHeightRecalculationCounter_;
static id mockTextInputView_;
void setupMockTextInputView_();
};
} // namespace facebook::react