diff --git a/src/pages/workspace/WorkspaceMembersPage.js b/src/pages/workspace/WorkspaceMembersPage.js index dcf70386255d..19db6d28bb70 100644 --- a/src/pages/workspace/WorkspaceMembersPage.js +++ b/src/pages/workspace/WorkspaceMembersPage.js @@ -1,8 +1,7 @@ import React from 'react'; import _ from 'underscore'; import lodashGet from 'lodash/get'; -// eslint-disable-next-line no-restricted-imports -import {View, TouchableOpacity} from 'react-native'; +import {View} from 'react-native'; import PropTypes from 'prop-types'; import {withOnyx} from 'react-native-onyx'; import styles from '../../styles/styles'; @@ -35,6 +34,7 @@ import TextInput from '../../components/TextInput'; import KeyboardDismissingFlatList from '../../components/KeyboardDismissingFlatList'; import withCurrentUserPersonalDetails from '../../components/withCurrentUserPersonalDetails'; import * as PolicyUtils from '../../libs/PolicyUtils'; +import PressableWithFeedback from '../../components/Pressable/PressableWithFeedback'; const propTypes = { /** The personal details of the person who is logged in */ @@ -319,6 +319,7 @@ class WorkspaceMembersPage extends React.Component { * @returns {React.Component} */ renderItem({item}) { + const isChecked = _.contains(this.state.selectedEmployees, item.login); return ( - this.toggleUser(item.login, item.pendingAction)} - activeOpacity={0.7} + accessibilityRole="checkbox" + accessibilityState={{ + checked: isChecked, + }} + accessibilityLabel={this.props.formatPhoneNumber(item.displayName)} + // disable hover dimming + hoverDimmingValue={1} + pressDimmingValue={0.7} > this.toggleUser(item.login, item.pendingAction)} /> this.toggleUser(item.login, item.pendingAction)} + isDisabled boldStyle option={{ text: this.props.formatPhoneNumber(item.displayName), @@ -359,7 +367,7 @@ class WorkspaceMembersPage extends React.Component { {this.props.translate('common.admin')} )} - + {!_.isEmpty(this.state.errors[item.login]) && (