Skip to content

Commit

Permalink
Issue#11068 [Android] Add TextInput Example for LowerCase rewrite
Browse files Browse the repository at this point in the history
  • Loading branch information
fknives committed Jul 27, 2023
1 parent eb6e04d commit e567413
Showing 1 changed file with 31 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,30 @@ class RewriteExample extends React.Component<$FlowFixMeProps, any> {
}
}

class RewriteToLowerCaseExample extends React.Component<$FlowFixMeProps, any> {
constructor(props: any | void) {
super(props);
this.state = {text: ''};
}
render(): React.Node {
return (
<View style={styles.rewriteContainer}>
<TextInput
testID="rewrite_to_lowercase_input"
autoCorrect={false}
multiline={false}
onChangeText={text => {
text = text.toLowerCase();
this.setState({text});
}}
style={styles.default}
value={this.state.text}
/>
</View>
);
}
}

class RewriteExampleInvalidCharacters extends React.Component<
$FlowFixMeProps,
any,
Expand Down Expand Up @@ -854,6 +878,13 @@ module.exports = ([
return <RewriteExample />;
},
},
{
name: 'lowerCase',
title: "Live Re-Write to LowerCase",
render: function (): React.Node {
return <RewriteToLowerCaseExample />;
},
},
{
title: 'Live Re-Write (no spaces allowed)',
render: function (): React.Node {
Expand Down

0 comments on commit e567413

Please sign in to comment.