Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
onEndEditing = {(event) => {
const text = !Hf.isEmpty(event.nativeEvent.text) ? event.nativeEvent.text : `0`;
if (monetary && text.charAt(0) === `$`) {
if (event.nativeEvent.text.length === 1) {
onDoneEdit(0);
} else {
onDoneEdit(parseFloat(text.substring(1)));
}
} else {
onDoneEdit(parseFloat(text));
}
}}
onFocus = { onFocus }
onEndEditing = {(event) => {
if (!Hf.isEmpty(event.nativeEvent.text)) {
const [
fieldTextInput
] = component.lookupComponentRefs(
`fieldTextInput`
);
fieldTextInput.setNativeProps({
text: `${parseInt(event.nativeEvent.text, 10)}`
});
}
}}
onSubmitEditing = {(event) => {
onEndEditing = {(event) => {
if (!Hf.isEmpty(event.nativeEvent.text)) {
const [
fieldTextInput
] = component.lookupComponentRefs(
`fieldTextInput`
);
fieldTextInput.setNativeProps({
text: `${parseInt(event.nativeEvent.text, 10)}`
});
}
}}
onSubmitEditing = {(event) => {
onEndEditing = {(event) => {
if (!Hf.isEmpty(event.nativeEvent.text)) {
const [
fieldTextInput
] = component.lookupComponentRefs(
`fieldTextInput`
);
fieldTextInput.setNativeProps({
text: `${parseInt(event.nativeEvent.text, 10)}`
});
}
}}
onSubmitEditing = {(event) => {
onEndEditing = {(event) => {
if (!Hf.isEmpty(event.nativeEvent.text)) {
const [
fieldTextInput
] = component.lookupComponentRefs(
`fieldTextInput`
);
fieldTextInput.setNativeProps({
text: `${parseInt(event.nativeEvent.text, 10)}`
});
}
}}
onSubmitEditing = {(event) => {