@tarojs/components-rn 3.5.5-alpha.0 → 3.5.5-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
*/
|
|
26
26
|
import * as React from 'react';
|
|
27
27
|
import { TextInput, Platform } from 'react-native';
|
|
28
|
-
import { noop, omit, parseStyles } from '../../utils';
|
|
28
|
+
import { noop, omit, parseStyles, useUpdateEffect } from '../../utils';
|
|
29
29
|
const keyboardTypeMap = {
|
|
30
30
|
text: 'default',
|
|
31
31
|
number: 'numeric',
|
|
@@ -35,174 +35,177 @@ const keyboardTypeMap = {
|
|
|
35
35
|
android: 'numeric'
|
|
36
36
|
}) || ''
|
|
37
37
|
};
|
|
38
|
-
|
|
39
|
-
// done: '完成',
|
|
40
|
-
// send: '发送',
|
|
41
|
-
// search: '搜索',
|
|
42
|
-
// next: '下一个',
|
|
43
|
-
// go: '前往',
|
|
44
|
-
// }
|
|
45
|
-
class _Input extends React.Component {
|
|
46
|
-
constructor() {
|
|
47
|
-
super(...arguments);
|
|
48
|
-
this.state = {
|
|
49
|
-
returnValue: undefined,
|
|
50
|
-
height: 0,
|
|
51
|
-
value: undefined
|
|
52
|
-
};
|
|
53
|
-
this.lineCount = 0;
|
|
54
|
-
this.onChangeText = (text) => {
|
|
55
|
-
const { onInput, onChange } = this.props;
|
|
56
|
-
const { returnValue } = this.state;
|
|
57
|
-
const onEvent = onInput || onChange;
|
|
58
|
-
this.tmpValue = text || '';
|
|
59
|
-
if (onEvent) {
|
|
60
|
-
const result = onEvent({
|
|
61
|
-
target: { value: text },
|
|
62
|
-
detail: { value: text }
|
|
63
|
-
});
|
|
64
|
-
// Be care of flickering
|
|
65
|
-
// @see https://facebook.github.io/react-native/docs/textinput.html#value
|
|
66
|
-
if (typeof result === 'string') {
|
|
67
|
-
this.tmpValue = result;
|
|
68
|
-
this.setState({ returnValue: result });
|
|
69
|
-
}
|
|
70
|
-
else if (returnValue) {
|
|
71
|
-
this.setState({ returnValue: undefined });
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
this.onFocus = () => {
|
|
76
|
-
const { onFocus = noop } = this.props;
|
|
77
|
-
// event.detail = { value, height }
|
|
78
|
-
const { returnValue } = this.state;
|
|
79
|
-
this.tmpValue = returnValue || '';
|
|
80
|
-
onFocus({
|
|
81
|
-
target: { value: this.tmpValue || '' },
|
|
82
|
-
detail: { value: this.tmpValue || '' }
|
|
83
|
-
});
|
|
84
|
-
};
|
|
85
|
-
this.onBlur = () => {
|
|
86
|
-
const { onBlur = noop } = this.props;
|
|
87
|
-
onBlur({
|
|
88
|
-
target: { value: this.tmpValue || '' },
|
|
89
|
-
detail: { value: this.tmpValue || '' }
|
|
90
|
-
});
|
|
91
|
-
};
|
|
92
|
-
/**
|
|
93
|
-
* Callback that is called when a key is pressed.
|
|
94
|
-
* This will be called with `{ nativeEvent: { key: keyValue } }`
|
|
95
|
-
* where `keyValue` is `'Enter'` or `'Backspace'` for respective keys and
|
|
96
|
-
* the typed-in character otherwise including `' '` for space.
|
|
97
|
-
* Fires before `onChange` callbacks.
|
|
98
|
-
*/
|
|
99
|
-
this.onKeyPress = (event) => {
|
|
100
|
-
const { onKeyDown = noop, onConfirm = noop } = this.props;
|
|
101
|
-
const keyValue = event.nativeEvent.key;
|
|
102
|
-
let which;
|
|
103
|
-
keyValue === 'Enter' && (which = 13);
|
|
104
|
-
keyValue === 'Backspace' && (which = 8);
|
|
105
|
-
onKeyDown({
|
|
106
|
-
which,
|
|
107
|
-
target: { value: this.tmpValue || '' },
|
|
108
|
-
detail: { value: this.tmpValue || '' }
|
|
109
|
-
});
|
|
110
|
-
if (keyValue !== 'Enter')
|
|
111
|
-
return;
|
|
112
|
-
onConfirm({
|
|
113
|
-
target: { value: this.tmpValue || '' },
|
|
114
|
-
detail: { value: this.tmpValue || '' }
|
|
115
|
-
});
|
|
116
|
-
};
|
|
117
|
-
this.onSubmitEditing = () => {
|
|
118
|
-
const { onKeyDown = noop, onConfirm = noop, _multiline } = this.props;
|
|
119
|
-
if (_multiline)
|
|
120
|
-
return;
|
|
121
|
-
onKeyDown({
|
|
122
|
-
which: 13,
|
|
123
|
-
target: { value: this.tmpValue || '' },
|
|
124
|
-
detail: { value: this.tmpValue || '' }
|
|
125
|
-
});
|
|
126
|
-
onConfirm({
|
|
127
|
-
target: { value: this.tmpValue || '' },
|
|
128
|
-
detail: { value: this.tmpValue || '' }
|
|
129
|
-
});
|
|
130
|
-
};
|
|
131
|
-
this.onContentSizeChange = (event) => {
|
|
132
|
-
const { width, height } = event.nativeEvent.contentSize;
|
|
133
|
-
// One of width and height may be 0.
|
|
134
|
-
if (width && height) {
|
|
135
|
-
const { _multiline, _autoHeight, _onLineChange = noop } = this.props;
|
|
136
|
-
if (!_multiline || !_autoHeight || height === this.state.height)
|
|
137
|
-
return;
|
|
138
|
-
this.lineCount += height > this.state.height ? 1 : -1;
|
|
139
|
-
_onLineChange({ detail: { height, lineCount: this.lineCount } });
|
|
140
|
-
this.setState({ height });
|
|
141
|
-
}
|
|
142
|
-
};
|
|
143
|
-
}
|
|
144
|
-
static getDerivedStateFromProps(props, state) {
|
|
145
|
-
return props.value !== state.value
|
|
146
|
-
? Object.assign(Object.assign({}, state), { returnValue: props.value }) : null;
|
|
147
|
-
}
|
|
148
|
-
render() {
|
|
149
|
-
var _a;
|
|
150
|
-
let { style, value, type, password, placeholder, disabled, maxlength, confirmType, confirmHold, cursor, selectionStart, selectionEnd, _multiline, _autoHeight, autoFocus, focus, placeholderStyle, } = this.props;
|
|
151
|
-
const keyboardType = keyboardTypeMap[type];
|
|
152
|
-
const selection = (() => {
|
|
153
|
-
if (selectionStart >= 0 && selectionEnd >= 0) {
|
|
154
|
-
return { start: selectionStart, end: selectionEnd };
|
|
155
|
-
}
|
|
156
|
-
else if (typeof cursor === 'number') {
|
|
157
|
-
return { start: cursor, end: cursor };
|
|
158
|
-
}
|
|
159
|
-
})();
|
|
160
|
-
value = type === 'number' && value ? value + '' : value;
|
|
161
|
-
// fix: https://reactnative.dev/docs/textinput#multiline
|
|
162
|
-
const textAlignVertical = _multiline ? 'top' : 'auto';
|
|
163
|
-
const placeholderTextColor = this.props.placeholderTextColor || ((_a = parseStyles(placeholderStyle)) === null || _a === void 0 ? void 0 : _a.color);
|
|
164
|
-
const props = omit(this.props, [
|
|
165
|
-
'style',
|
|
166
|
-
'value',
|
|
167
|
-
'type',
|
|
168
|
-
'password',
|
|
169
|
-
'placeholder',
|
|
170
|
-
'disabled',
|
|
171
|
-
'maxlength',
|
|
172
|
-
'confirmType',
|
|
173
|
-
'confirmHold',
|
|
174
|
-
'cursor',
|
|
175
|
-
'selectionStart',
|
|
176
|
-
'selectionEnd',
|
|
177
|
-
'onInput',
|
|
178
|
-
'onFocus',
|
|
179
|
-
'onBlur',
|
|
180
|
-
'onKeyDown',
|
|
181
|
-
'onConfirm',
|
|
182
|
-
'_multiline',
|
|
183
|
-
'_autoHeight',
|
|
184
|
-
'_onLineChange',
|
|
185
|
-
'placeholderStyle',
|
|
186
|
-
'placeholderTextColor',
|
|
187
|
-
]);
|
|
188
|
-
return (React.createElement(TextInput, Object.assign({}, props, { defaultValue: value, keyboardType: keyboardType, secureTextEntry: !!password, placeholder: placeholder, editable: !disabled, maxLength: maxlength === -1 ? undefined : maxlength,
|
|
189
|
-
// returnKeyLabel={confirmType}
|
|
190
|
-
returnKeyType: confirmType, blurOnSubmit: !_multiline && !confirmHold, autoFocus: !!autoFocus || !!focus, selection: selection, onChangeText: this.onChangeText, value: this.state.returnValue, onFocus: this.onFocus, onBlur: this.onBlur, onKeyPress: this.onKeyPress, onSubmitEditing: this.onSubmitEditing, multiline: !!_multiline, textAlignVertical: textAlignVertical, onContentSizeChange: this.onContentSizeChange, underlineColorAndroid: "rgba(0,0,0,0)", placeholderTextColor: placeholderTextColor, style: [
|
|
191
|
-
{
|
|
192
|
-
padding: 0
|
|
193
|
-
},
|
|
194
|
-
style,
|
|
195
|
-
_multiline && _autoHeight && { height: Math.max(35, this.state.height) }
|
|
196
|
-
] })));
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
_Input.displayName = '_Input';
|
|
200
|
-
_Input.defaultProps = {
|
|
38
|
+
const defaultProps = {
|
|
201
39
|
type: 'text',
|
|
202
40
|
maxlength: 140,
|
|
203
41
|
confirmType: 'done',
|
|
204
42
|
selectionStart: -1,
|
|
205
43
|
selectionEnd: -1
|
|
206
44
|
};
|
|
45
|
+
const _Input = (props) => {
|
|
46
|
+
var _a;
|
|
47
|
+
const { style, value, type = defaultProps.type, password, placeholder, disabled, maxlength = defaultProps.maxlength, confirmType, confirmHold, cursor, selectionStart = defaultProps.selectionStart, selectionEnd = defaultProps.selectionEnd, _multiline, _autoHeight, autoFocus, focus, placeholderStyle } = props;
|
|
48
|
+
const [returnValue, setReturnValue] = React.useState();
|
|
49
|
+
/** 用于保存输入框值 */
|
|
50
|
+
const tmpValue = React.useRef();
|
|
51
|
+
const [_height, setHeight] = React.useState(0);
|
|
52
|
+
const lineCount = React.useRef(0);
|
|
53
|
+
const inputRef = React.useRef();
|
|
54
|
+
React.useEffect(() => {
|
|
55
|
+
tmpValue.current = value;
|
|
56
|
+
setReturnValue(val => {
|
|
57
|
+
if (val !== value) {
|
|
58
|
+
return value;
|
|
59
|
+
}
|
|
60
|
+
return val;
|
|
61
|
+
});
|
|
62
|
+
}, [returnValue, value]);
|
|
63
|
+
// fix: https://github.com/NervJS/taro/issues/11350
|
|
64
|
+
useUpdateEffect(() => {
|
|
65
|
+
if (!inputRef.current) {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
if (focus) {
|
|
69
|
+
inputRef.current.focus();
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
inputRef.current.blur();
|
|
73
|
+
}
|
|
74
|
+
}, [focus]);
|
|
75
|
+
const onChangeText = React.useCallback((text) => {
|
|
76
|
+
const { onInput, onChange } = props;
|
|
77
|
+
const onEvent = onInput || onChange;
|
|
78
|
+
tmpValue.current = text || '';
|
|
79
|
+
if (onEvent) {
|
|
80
|
+
const result = onEvent({
|
|
81
|
+
target: { value: text },
|
|
82
|
+
detail: { value: text }
|
|
83
|
+
});
|
|
84
|
+
// Be care of flickering
|
|
85
|
+
// @see https://facebook.github.io/react-native/docs/textinput.html#value
|
|
86
|
+
if (typeof result === 'string') {
|
|
87
|
+
tmpValue.current = result;
|
|
88
|
+
setReturnValue(result);
|
|
89
|
+
}
|
|
90
|
+
else if (returnValue) {
|
|
91
|
+
// 为了处理输入不合法,setState 相同值时,状态不更新,UI 也得不到更新,重置状态进而更新
|
|
92
|
+
setReturnValue(undefined);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}, [returnValue]);
|
|
96
|
+
const onFocus = React.useCallback(() => {
|
|
97
|
+
const { onFocus = noop } = props;
|
|
98
|
+
onFocus({
|
|
99
|
+
target: { value: tmpValue.current || '' },
|
|
100
|
+
detail: { value: tmpValue.current || '' }
|
|
101
|
+
});
|
|
102
|
+
}, [returnValue]);
|
|
103
|
+
const onBlur = React.useCallback(() => {
|
|
104
|
+
const { onBlur = noop } = props;
|
|
105
|
+
onBlur({
|
|
106
|
+
target: { value: tmpValue.current || '' },
|
|
107
|
+
detail: { value: tmpValue.current || '' }
|
|
108
|
+
});
|
|
109
|
+
}, []);
|
|
110
|
+
/**
|
|
111
|
+
* Callback that is called when a key is pressed.
|
|
112
|
+
* This will be called with `{ nativeEvent: { key: keyValue } }`
|
|
113
|
+
* where `keyValue` is `'Enter'` or `'Backspace'` for respective keys and
|
|
114
|
+
* the typed-in character otherwise including `' '` for space.
|
|
115
|
+
* Fires before `onChange` callbacks.
|
|
116
|
+
*/
|
|
117
|
+
const onKeyPress = React.useCallback((event) => {
|
|
118
|
+
const { onKeyDown = noop, onConfirm = noop } = props;
|
|
119
|
+
const keyValue = event.nativeEvent.key;
|
|
120
|
+
let which;
|
|
121
|
+
keyValue === 'Enter' && (which = 13);
|
|
122
|
+
keyValue === 'Backspace' && (which = 8);
|
|
123
|
+
onKeyDown({
|
|
124
|
+
which,
|
|
125
|
+
target: { value: tmpValue.current || '' },
|
|
126
|
+
detail: { value: tmpValue.current || '' }
|
|
127
|
+
});
|
|
128
|
+
if (keyValue !== 'Enter')
|
|
129
|
+
return;
|
|
130
|
+
onConfirm({
|
|
131
|
+
target: { value: tmpValue.current || '' },
|
|
132
|
+
detail: { value: tmpValue.current || '' }
|
|
133
|
+
});
|
|
134
|
+
}, []);
|
|
135
|
+
const onSubmitEditing = React.useCallback(() => {
|
|
136
|
+
const { onKeyDown = noop, onConfirm = noop } = props;
|
|
137
|
+
if (_multiline)
|
|
138
|
+
return;
|
|
139
|
+
onKeyDown({
|
|
140
|
+
which: 13,
|
|
141
|
+
target: { value: tmpValue.current || '' },
|
|
142
|
+
detail: { value: tmpValue.current || '' }
|
|
143
|
+
});
|
|
144
|
+
onConfirm({
|
|
145
|
+
target: { value: tmpValue.current || '' },
|
|
146
|
+
detail: { value: tmpValue.current || '' }
|
|
147
|
+
});
|
|
148
|
+
}, [_multiline]);
|
|
149
|
+
const onContentSizeChange = React.useCallback((event) => {
|
|
150
|
+
const { width, height } = event.nativeEvent.contentSize;
|
|
151
|
+
// One of width and height may be 0.
|
|
152
|
+
if (width && height) {
|
|
153
|
+
const { _onLineChange = noop } = props;
|
|
154
|
+
if (!_multiline || !_autoHeight || height === _height)
|
|
155
|
+
return;
|
|
156
|
+
lineCount.current += height > _height ? 1 : -1;
|
|
157
|
+
_onLineChange({ detail: { height, lineCount: lineCount.current } });
|
|
158
|
+
setHeight(height);
|
|
159
|
+
}
|
|
160
|
+
}, [_height, _multiline, _autoHeight]);
|
|
161
|
+
const keyboardType = keyboardTypeMap[type];
|
|
162
|
+
const selection = (() => {
|
|
163
|
+
if (selectionStart >= 0 && selectionEnd >= 0) {
|
|
164
|
+
return { start: selectionStart, end: selectionEnd };
|
|
165
|
+
}
|
|
166
|
+
else if (typeof cursor === 'number') {
|
|
167
|
+
return { start: cursor, end: cursor };
|
|
168
|
+
}
|
|
169
|
+
})();
|
|
170
|
+
const defaultValue = type === 'number' && value ? value + '' : value;
|
|
171
|
+
// fix: https://reactnative.dev/docs/textinput#multiline
|
|
172
|
+
const textAlignVertical = _multiline ? 'top' : 'auto';
|
|
173
|
+
const placeholderTextColor = props.placeholderTextColor || ((_a = parseStyles(placeholderStyle)) === null || _a === void 0 ? void 0 : _a.color);
|
|
174
|
+
const inputProps = omit(props, [
|
|
175
|
+
'style',
|
|
176
|
+
'value',
|
|
177
|
+
'type',
|
|
178
|
+
'password',
|
|
179
|
+
'placeholder',
|
|
180
|
+
'disabled',
|
|
181
|
+
'maxlength',
|
|
182
|
+
'confirmType',
|
|
183
|
+
'confirmHold',
|
|
184
|
+
'cursor',
|
|
185
|
+
'selectionStart',
|
|
186
|
+
'selectionEnd',
|
|
187
|
+
'onInput',
|
|
188
|
+
'onFocus',
|
|
189
|
+
'onBlur',
|
|
190
|
+
'onKeyDown',
|
|
191
|
+
'onConfirm',
|
|
192
|
+
'_multiline',
|
|
193
|
+
'_autoHeight',
|
|
194
|
+
'_onLineChange',
|
|
195
|
+
'placeholderStyle',
|
|
196
|
+
'placeholderTextColor',
|
|
197
|
+
]);
|
|
198
|
+
return (React.createElement(TextInput, Object.assign({}, inputProps, { ref: inputRef, defaultValue: defaultValue, keyboardType: keyboardType, secureTextEntry: !!password, placeholder: placeholder, editable: !disabled, maxLength: maxlength === -1 ? undefined : maxlength,
|
|
199
|
+
// returnKeyLabel={confirmType}
|
|
200
|
+
returnKeyType: confirmType, blurOnSubmit: !_multiline && !confirmHold, autoFocus: !!autoFocus || !!focus, selection: selection, onChangeText: onChangeText, value: returnValue, onFocus: onFocus, onBlur: onBlur, onKeyPress: onKeyPress, onSubmitEditing: onSubmitEditing, multiline: !!_multiline, textAlignVertical: textAlignVertical, onContentSizeChange: onContentSizeChange, underlineColorAndroid: "rgba(0,0,0,0)", placeholderTextColor: placeholderTextColor, style: [
|
|
201
|
+
{
|
|
202
|
+
padding: 0
|
|
203
|
+
},
|
|
204
|
+
style,
|
|
205
|
+
_multiline && _autoHeight && { height: Math.max(35, _height) }
|
|
206
|
+
] })));
|
|
207
|
+
};
|
|
208
|
+
_Input.defaultProps = defaultProps;
|
|
209
|
+
_Input.displayName = '_Input';
|
|
207
210
|
export default _Input;
|
|
208
211
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Input/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EACL,SAAS,EACT,QAAQ,EAKT,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Input/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EACL,SAAS,EACT,QAAQ,EAKT,MAAM,cAAc,CAAA;AACrB,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAGtE,MAAM,eAAe,GAA8B;IACjD,IAAI,EAAE,SAAS;IACf,MAAM,EAAE,SAAS;IACjB,MAAM,EAAE,SAAS;IACjB,KAAK,EACH,QAAQ,CAAC,MAAM,CAAC;QACd,GAAG,EAAE,aAAa;QAClB,OAAO,EAAE,SAAS;KACnB,CAAC,IAAI,EAAE;CACX,CAAA;AAED,MAAM,YAAY,GAAG;IACnB,IAAI,EAAE,MAAM;IACZ,SAAS,EAAE,GAAG;IACd,WAAW,EAAE,MAAM;IACnB,cAAc,EAAE,CAAC,CAAC;IAClB,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,CAAC,QAAQ,EACnB,SAAS,EAAE,SAAS,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS;QACnD,+BAA+B;QAC/B,aAAa,EAAE,WAAW,EAC1B,YAAY,EAAE,CAAC,UAAU,IAAI,CAAC,WAAW,EACzC,SAAS,EAAE,CAAC,CAAC,SAAS,IAAI,CAAC,CAAC,KAAK,EACjC,SAAS,EAAE,SAAS,EACpB,YAAY,EAAE,YAAY,EAC1B,KAAK,EAAE,WAAW,EAClB,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,UAAU,EACtB,eAAe,EAAE,eAAe,EAChC,SAAS,EAAE,CAAC,CAAC,UAAU,EACvB,iBAAiB,EAAE,iBAAiB,EACpC,mBAAmB,EAAE,mBAAmB,EACxC,qBAAqB,EAAC,eAAe,EACrC,oBAAoB,EAAE,oBAAoB,EAC1C,KAAK,EAAE;YACL;gBACE,OAAO,EAAE,CAAC;aACX;YACD,KAAK;YACL,UAAU,IAAI,WAAW,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,OAAO,CAAC,EAAE;SAC/D,IACD,CACH,CAAA;AACH,CAAC,CAAA;AAED,MAAM,CAAC,YAAY,GAAG,YAA0B,CAAA;AAEhD,MAAM,CAAC,WAAW,GAAG,QAAQ,CAAA;AAE7B,eAAe,MAAM,CAAA"}
|
|
@@ -13,8 +13,8 @@ import { Keyboard } from 'react-native';
|
|
|
13
13
|
import Input from '../Input';
|
|
14
14
|
import { omit } from '../../utils';
|
|
15
15
|
const _Textarea = (props) => {
|
|
16
|
-
const { autoHeight,
|
|
17
|
-
|
|
16
|
+
const { autoHeight, autoFocus, focus, maxlength, onLineChange } = props;
|
|
17
|
+
const textearaProps = omit(props, [
|
|
18
18
|
'type',
|
|
19
19
|
'password',
|
|
20
20
|
'confirmType',
|
|
@@ -23,7 +23,8 @@ const _Textarea = (props) => {
|
|
|
23
23
|
'autoHeight',
|
|
24
24
|
'onLineChange',
|
|
25
25
|
'maxlength'
|
|
26
|
-
])
|
|
26
|
+
]);
|
|
27
|
+
return (React.createElement(Input, Object.assign({ _multiline: true, _autoHeight: autoHeight, _onLineChange: onLineChange, focus: !!focus, autoFocus: !!autoFocus, confirmType: "next", onBlur: () => Keyboard.dismiss() }, textearaProps, { maxlength: maxlength })));
|
|
27
28
|
};
|
|
28
29
|
_Textarea.displayName = '_Textarea';
|
|
29
30
|
export default _Textarea;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Textarea/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AACvC,OAAO,KAAK,MAAM,UAAU,CAAA;AAC5B,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAGlC,MAAM,SAAS,GAA4B,CAAC,KAAoB,EAAE,EAAE;IAClE,MAAM,EAAE,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Textarea/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AACvC,OAAO,KAAK,MAAM,UAAU,CAAA;AAC5B,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAGlC,MAAM,SAAS,GAA4B,CAAC,KAAoB,EAAE,EAAE;IAClE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,GAAG,KAAK,CAAA;IACvE,MAAM,aAAa,GAAG,IAAI,CAAC,KAAK,EAAE;QAChC,MAAM;QACN,UAAU;QACV,aAAa;QACb,aAAa;QACb,QAAQ;QACR,YAAY;QACZ,cAAc;QACd,WAAW;KACZ,CAAC,CAAA;IAEF,OAAO,CACL,oBAAC,KAAK,kBACJ,UAAU,EAAE,IAAI,EAChB,WAAW,EAAE,UAAU,EACvB,aAAa,EAAE,YAAY,EAC3B,KAAK,EAAE,CAAC,CAAC,KAAK,EACd,SAAS,EAAE,CAAC,CAAC,SAAS,EACtB,WAAW,EAAC,MAAM,EAClB,MAAM,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,OAAO,EAAE,IAC5B,aAAa,IACjB,SAAS,EAAE,SAAS,IACpB,CACH,CAAA;AACH,CAAC,CAAA;AAED,SAAS,CAAC,WAAW,GAAG,WAAW,CAAA;AAEnC,eAAe,SAAS,CAAA"}
|
package/dist/utils/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { StyleSheet } from 'react-native';
|
|
2
|
+
import * as React from 'react';
|
|
2
3
|
// @see https://facebook.github.io/react-native/docs/layout-props.html
|
|
3
4
|
// @see https://facebook.github.io/react-native/docs/view-style-props.html
|
|
4
5
|
// @todo According to the source code of ScrollView, ['alignItems','justifyContent'] should be set to contentContainerStyle
|
|
@@ -66,10 +67,28 @@ export const parseStyles = (styles = '') => {
|
|
|
66
67
|
};
|
|
67
68
|
// eslint-disable-next-line
|
|
68
69
|
export const noop = (..._args) => { };
|
|
70
|
+
export const useUpdateEffect = (effect, deps) => {
|
|
71
|
+
const isMounted = React.useRef(false);
|
|
72
|
+
// for react-refresh
|
|
73
|
+
React.useEffect(() => {
|
|
74
|
+
return () => {
|
|
75
|
+
isMounted.current = false;
|
|
76
|
+
};
|
|
77
|
+
}, []);
|
|
78
|
+
React.useEffect(() => {
|
|
79
|
+
if (!isMounted.current) {
|
|
80
|
+
isMounted.current = true;
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
return effect();
|
|
84
|
+
}
|
|
85
|
+
}, deps);
|
|
86
|
+
};
|
|
69
87
|
export default {
|
|
70
88
|
omit,
|
|
71
89
|
dismemberStyle,
|
|
72
90
|
parseStyles,
|
|
73
91
|
noop,
|
|
92
|
+
useUpdateEffect
|
|
74
93
|
};
|
|
75
94
|
//# sourceMappingURL=index.js.map
|
package/dist/utils/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EAIX,MAAM,cAAc,CAAA;AAErB,sEAAsE;AACtE,0EAA0E;AAC1E,2HAA2H;AAE3H,MAAM,wBAAwB,GAAG,6HAA6H,CAAA;AAC9J,0JAA0J;AAC1J,MAAM,qBAAqB,GAAG,oCAAoC,CAAA;AAClE,MAAM,gBAAgB,GAAG,kFAAkF,CAAA;AAE3G,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,KAA4B,EAAyB,EAAE;IACvF,MAAM,YAAY,GAAG,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;IAC9C,MAAM,SAAS,GAAuC,EAAE,CAAA;IACxD,IAAI,YAAY,EAAE;QAChB,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC,CAAC,GAAW,EAAE,EAAE;YAChD,IAAI,gBAAgB,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;gBAC9B,SAAS,CAAC,GAAG,CAAC,GAAG,YAAY,CAAC,GAAG,CAAC,CAAA;aACnC;QACH,CAAC,CAAC,CAAA;KACH;IACD,OAAO,SAAS,CAAA;AAClB,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,MAAW,EAAE,EAAE,SAAmB,EAAE,EAA0B,EAAE;IACnF,MAAM,WAAW,qBAAQ,GAAG,CAAE,CAAA;IAC9B,MAAM,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;QACrB,OAAO,WAAW,CAAC,GAAG,CAAC,CAAA;IACzB,CAAC,CAAC,CAAA;IACF,OAAO,WAAW,CAAA;AACpB,CA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