Skip to content

Commit

Permalink
Merge pull request #16602 from PrashantMangukiya/prashant-15779
Browse files Browse the repository at this point in the history
Add Placeholder text and No results found message on Pronouns Search Page
  • Loading branch information
jasperhuangg authored Mar 28, 2023
2 parents 7003d95 + bfc93c7 commit f67d5df
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/languages/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,7 @@ export default {
pronounsPage: {
pronouns: 'Pronouns',
isShownOnProfile: 'Your pronouns are shown on your profile.',
placeholderText: 'Search to see options',
},
contacts: {
contactMethod: 'Contact method',
Expand Down
1 change: 1 addition & 0 deletions src/languages/es.js
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@ export default {
pronounsPage: {
pronouns: 'Pronombres',
isShownOnProfile: 'Tus pronombres se muestran en tu perfil.',
placeholderText: 'Buscar para ver opciones',
},
contacts: {
contactMethod: 'Método de contacto',
Expand Down
3 changes: 3 additions & 0 deletions src/pages/settings/Profile/PronounsPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ class PronounsPage extends Component {

render() {
const filteredPronounsList = this.getFilteredPronouns();
const headerMessage = this.state.searchValue.trim() && !filteredPronounsList.length ? this.props.translate('common.noResultsFound') : '';

return (
<ScreenWrapper includeSafeAreaPaddingBottom={false}>
Expand All @@ -122,6 +123,8 @@ class PronounsPage extends Component {
</Text>
<OptionsSelector
textInputLabel={this.props.translate('pronounsPage.pronouns')}
placeholderText={this.props.translate('pronounsPage.placeholderText')}
headerMessage={headerMessage}
sections={[{data: filteredPronounsList}]}
value={this.state.searchValue}
onSelectRow={this.updatePronouns}
Expand Down

0 comments on commit f67d5df

Please sign in to comment.