Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: SelectionList multiple selection #22622

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
717e22b
chore: wip
thiagobrez Jun 22, 2023
ae15864
chore: fix conflicts
thiagobrez Jun 27, 2023
3cc3c93
chore: add avatar to checkbox item
thiagobrez Jun 27, 2023
647441f
chore: add errors to checkbox item
thiagobrez Jun 28, 2023
4cf5918
chore: wip
thiagobrez Jun 29, 2023
06b650c
chore: workspace invite page working
thiagobrez Jun 29, 2023
af2e1b9
chore: money request split page working
thiagobrez Jun 30, 2023
4a076cb
chore: new group page working
thiagobrez Jun 30, 2023
2059d9d
chore: fix conflicts
thiagobrez Jul 10, 2023
b2e57ad
chore: fix conflicts
thiagobrez Jul 10, 2023
128477f
chore: fix invite page
thiagobrez Jul 11, 2023
5404d2b
chore: cleanup
thiagobrez Jul 11, 2023
0ae6181
chore: fix conflicts
thiagobrez Jul 11, 2023
fba18bf
refactor: rename SelectionListRadio to SelectionList
thiagobrez Jul 11, 2023
246d6e0
chore: add stories for multiple selection
thiagobrez Jul 11, 2023
39c8c74
chore: add stories for multiple selection
thiagobrez Jul 11, 2023
4cdc5da
test: add more perf test cases
thiagobrez Jul 12, 2023
46f4328
chore: fix srolling issues
thiagobrez Jul 12, 2023
254d5d2
chore: address pr comments
thiagobrez Jul 13, 2023
b02b04a
chore: fix conflicts
thiagobrez Jul 13, 2023
2f8118a
chore: fix lint issues
thiagobrez Jul 13, 2023
cd96314
chore: make onSelectRow required
thiagobrez Jul 13, 2023
4d5c63d
Merge branch 'main' into refactor/selection_list/checkbox_list
thiagobrez Jul 14, 2023
87755e3
chore: fix conflicts
thiagobrez Jul 17, 2023
f21a96a
chore: fix YearPickerModal propTypes
thiagobrez Jul 24, 2023
990690c
chore: fix conflicts
thiagobrez Jul 24, 2023
35301b5
test: add test for formatMemberForList
thiagobrez Jul 25, 2023
137cff3
test: improve comment
thiagobrez Jul 25, 2023
3d12b6d
chore: fix conflicts
thiagobrez Jul 26, 2023
dc9b8a9
chore: fix lint issues
thiagobrez Jul 26, 2023
7a999c1
Merge branch 'main' into refactor/selection_list/checkbox_list
thiagobrez Jul 26, 2023
5f6921e
chore: fix lint issues
thiagobrez Jul 26, 2023
5199ca3
Merge branch 'main' into refactor/selection_list/checkbox_list
thiagobrez Jul 27, 2023
1acf551
feat(selection-list): focus next available index
thiagobrez Jul 28, 2023
6b34e19
fix(selection-list): highlight position on select
thiagobrez Aug 1, 2023
0321599
fix(selection-list): highlight position on select
thiagobrez Aug 2, 2023
3ac0892
chore: fix conflicts
thiagobrez Aug 2, 2023
fdc04d3
fix(selection-list): highlight for single section
thiagobrez Aug 2, 2023
be53f55
fix(selection-list): add fallback to avatar
thiagobrez Aug 7, 2023
6b0ebc4
chore: fix conflicts
thiagobrez Aug 7, 2023
da61781
feat(selection-list): add scroll indicator support
thiagobrez Aug 7, 2023
f856020
chore: fix conflicts
thiagobrez Aug 11, 2023
a683dac
chore: fix lint issues
thiagobrez Aug 11, 2023
194820e
chore: fix conflicts
thiagobrez Aug 14, 2023
9be8ad7
chore: fix conflicts
thiagobrez Aug 16, 2023
7197326
fix(selection-list): avatar generation
thiagobrez Aug 17, 2023
1b5a908
fix(selection-list): make rightElement generic
thiagobrez Aug 18, 2023
a97b078
chore: fix conflicts
thiagobrez Aug 18, 2023
64e4ba0
Merge branch 'main' into refactor/selection_list/checkbox_list
thiagobrez Aug 21, 2023
889e403
chore: fix conflicts
thiagobrez Aug 22, 2023
0b7be52
fix(selection-list): add loading placeholder
thiagobrez Aug 22, 2023
d9191ad
chore: fix tests
thiagobrez Aug 22, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/components/CountryPicker/CountrySelectorModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import PropTypes from 'prop-types';
import CONST from '../../CONST';
import useLocalize from '../../hooks/useLocalize';
import HeaderWithBackButton from '../HeaderWithBackButton';
import SelectionListRadio from '../SelectionListRadio';
import SelectionList from '../SelectionList';
import Modal from '../Modal';
import ScreenWrapper from '../ScreenWrapper';
import styles from '../../styles/styles';
Expand Down Expand Up @@ -73,16 +73,14 @@ function CountrySelectorModal({currentCountry, isVisible, onClose, onCountrySele
title={translate('common.country')}
onBackButtonPress={onClose}
/>
<SelectionListRadio
<SelectionList
headerMessage={headerMessage}
textInputLabel={translate('common.country')}
textInputPlaceholder={translate('countrySelectorModal.placeholderText')}
textInputValue={searchValue}
sections={[{data: searchResults, indexOffset: 0}]}
onSelectRow={onCountrySelected}
onChangeText={setSearchValue}
shouldFocusOnSelectRow
shouldHaveOptionSeparator
shouldDelayFocus
initiallyFocusedOptionKey={currentCountry}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import PropTypes from 'prop-types';
import _ from 'underscore';
import HeaderWithBackButton from '../../HeaderWithBackButton';
import CONST from '../../../CONST';
import SelectionListRadio from '../../SelectionListRadio';
import SelectionList from '../../SelectionList';
import Modal from '../../Modal';
import {radioListItemPropTypes} from '../../SelectionListRadio/selectionListRadioPropTypes';
import {radioListItemPropTypes} from '../../SelectionList/selectionListPropTypes';
import useLocalize from '../../../hooks/useLocalize';
import ScreenWrapper from '../../ScreenWrapper';
import styles from '../../../styles/styles';
Expand All @@ -15,7 +15,7 @@ const propTypes = {
isVisible: PropTypes.bool.isRequired,

/** The list of years to render */
years: PropTypes.arrayOf(PropTypes.shape(radioListItemPropTypes)).isRequired,
years: PropTypes.arrayOf(PropTypes.shape(radioListItemPropTypes.item)).isRequired,

/** Currently selected year */
currentYear: PropTypes.number,
Expand Down Expand Up @@ -69,7 +69,7 @@ function YearPickerModal(props) {
title={translate('yearPickerPage.year')}
onBackButtonPress={props.onClose}
/>
<SelectionListRadio
<SelectionList
shouldDelayFocus
textInputLabel={translate('yearPickerPage.selectYear')}
textInputValue={searchText}
Expand Down
Loading
Loading