MCPcopy Index your code
hub / github.com/nodegui/react-nodegui / setLineEditProps

Function setLineEditProps

src/components/LineEdit/RNLineEdit.ts:39–60  ·  view source on GitHub ↗
(
  widget: RNLineEdit,
  newProps: LineEditProps,
  oldProps: LineEditProps
)

Source from the content-addressed store, hash-verified

37}
38
39const setLineEditProps = (
40 widget: RNLineEdit,
41 newProps: LineEditProps,
42 oldProps: LineEditProps
43) => {
44 const setter: LineEditProps = {
45 set text(text: string) {
46 text ? widget.setText(text) : widget.clear();
47 },
48 set placeholderText(text: string) {
49 widget.setPlaceholderText(text);
50 },
51 set readOnly(isReadOnly: boolean) {
52 widget.setReadOnly(isReadOnly);
53 },
54 set echoMode(mode: EchoMode) {
55 widget.setEchoMode(mode);
56 }
57 };
58 Object.assign(setter, newProps);
59 setViewProps(widget, newProps, oldProps);
60};
61
62/**
63 * @ignore

Callers 1

setPropsMethod · 0.85

Calls 1

setViewPropsFunction · 0.90

Tested by

no test coverage detected