Skip to content

Commit f5cf09b

Browse files
committed
add the searchbar
1 parent e00eda9 commit f5cf09b

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

src/components/SpendRules/SpendRulesSection.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import Badge from '@components/Badge';
55
import Icon from '@components/Icon';
66
import MenuItem from '@components/MenuItem';
77
import OfflineWithFeedback from '@components/OfflineWithFeedback';
8+
import SearchBar from '@components/SearchBar';
89
import Section from '@components/Section';
910
import Text from '@components/Text';
1011
import useConfirmModal from '@hooks/useConfirmModal';
@@ -141,6 +142,14 @@ function SpendRulesSection({policyID}: SpendRulesSectionProps) {
141142
isCentralPane
142143
subtitleMuted
143144
>
145+
{cardRules.length > CONST.STANDARD_LIST_ITEM_LIMIT && (
146+
<SearchBar
147+
label={translate('workspace.card.searchRules')}
148+
inputValue={inputValue}
149+
onChangeText={setInputValue}
150+
shouldShowEmptyState={!isLoadingCardRules && filteredCardRules.length === 0}
151+
/>
152+
)}
144153
<MenuItem
145154
wrapperStyle={[styles.borderedContentCard, styles.mt6, styles.ph4, styles.pv4]}
146155
titleComponent={menuItemBody}

0 commit comments

Comments
 (0)