Repository navigation
Add search bar to Rillet pages #96528
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
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
1a027ac
add search bar to RilletBillPaymentAccountPage
s77rt db4c8c3
add search bar to RilletExpensifyCardSettlementAccountPage
s77rt a63c9e0
add search bar to RilletTravelInvoicingSettlementAccountPage
s77rt 8c285e0
export type RilletSubsidiary
s77rt 80bec13
add search bar to RilletSubsidiarySelector
s77rt f9f4473
add search bar to RilletCardProgramAccountSelector
s77rt 29cd774
add search bar to RilletCompanyCardAccountPage
s77rt 4c246bb
add search bar to RilletDefaultCompanyCardVendorPage
s77rt 2f64677
lint
s77rt c32b123
merge main
s77rt fb8ba9a
better param name
s77rt bd4033b
add useSelectionListSearch hook
s77rt c19208a
use useSelectionListSearch hook
s77rt 9340d3e
fix compiler error
s77rt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| import type {ListItem} from '@components/SelectionList/types'; | ||
|
|
||
| import tokenizedSearch from '@libs/tokenizedSearch'; | ||
|
|
||
| import CONST from '@src/CONST'; | ||
|
|
||
| import useLocalize from './useLocalize'; | ||
| import useSearchResults from './useSearchResults'; | ||
|
|
||
| function useSelectionListSearch<T extends ListItem & {value: string}>(data: T[]) { | ||
| const {translate} = useLocalize(); | ||
| const [searchValue, setSearchValue, filteredData] = useSearchResults(data, (item, searchInput) => tokenizedSearch([item], searchInput, () => [item.text ?? '', item.value]).length > 0); | ||
| const textInputOptions = { | ||
| label: data.length >= CONST.STANDARD_LIST_ITEM_LIMIT ? translate('common.search') : undefined, | ||
| value: searchValue, | ||
| onChangeText: setSearchValue, | ||
| }; | ||
| return {filteredData, textInputOptions}; | ||
| } | ||
| export default useSelectionListSearch; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2918,4 +2918,5 @@ export type { | |
| RilletBankAccount, | ||
| RilletAutoSync, | ||
| RilletSync, | ||
| RilletSubsidiary, | ||
| }; | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.