Skip to content

add selectedText #119

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 4 additions & 1 deletion components/MultipleSelectList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const MultipleSelectList: React.FC<MultipleSelectListProps> = ({
onSelect = () => {},
label,
notFoundText = "No data found",
selectedText ="Selected",
disabledItemStyles,
disabledTextStyles,
disabledCheckBoxStyles,
Expand Down Expand Up @@ -338,7 +339,9 @@ const MultipleSelectList: React.FC<MultipleSelectListProps> = ({
?
<Pressable>
<View style={{flexDirection:'row', justifyContent:'space-between',alignItems:'center',paddingLeft:20}}>
<Text style={{marginRight:20,fontWeight:'600',fontFamily}}>Selected</Text>
<Text style={{marginRight:20,fontWeight:'600',fontFamily}}>
{selectedText}
</Text>
<View style={{height: 1, flex: 1, backgroundColor: 'gray'}} />
</View>
<View style={{flexDirection:'row',paddingHorizontal:20,marginBottom:20,flexWrap:'wrap'}}>
Expand Down
5 changes: 5 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,11 @@ export interface MultipleSelectListProps {
*/
placeholder?: string,

/**
* Selected text that will be displayed in the select box
* */
selectedText?: string,

/**
* Additional styles for select box
*/
Expand Down