列表综合筛选
This commit is contained in:
@@ -7,10 +7,14 @@ interface IProps {
|
||||
handleFilterIcon: () => void;
|
||||
isSelect: boolean;
|
||||
filterCount: number;
|
||||
onChange: (value: string) => void;
|
||||
}
|
||||
|
||||
const SearchBarComponent = (props: IProps) => {
|
||||
const { handleFilterIcon, isSelect, filterCount } = props;
|
||||
const { handleFilterIcon, isSelect, filterCount, onChange } = props;
|
||||
const handleChange = (value: string) => {
|
||||
onChange && onChange(value);
|
||||
};
|
||||
return (
|
||||
<>
|
||||
<SearchBar
|
||||
@@ -30,11 +34,14 @@ const SearchBarComponent = (props: IProps) => {
|
||||
src={isSelect ? img.ICON_FILTER_SELECTED : img.ICON_FILTER}
|
||||
className={styles.filterIcon}
|
||||
/>
|
||||
<Text className={styles.filterCount}>{filterCount}</Text>
|
||||
{isSelect && (
|
||||
<Text className={styles.filterCount}>{filterCount}</Text>
|
||||
)}
|
||||
</View>
|
||||
}
|
||||
className={styles.searchBar}
|
||||
placeholder="搜索上海的球局和场地"
|
||||
onChange={handleChange}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user