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

Display the component in a row along with other components #306

Closed
Bilal-Abdeen opened this issue Mar 12, 2024 · 4 comments
Closed

Display the component in a row along with other components #306

Bilal-Abdeen opened this issue Mar 12, 2024 · 4 comments

Comments

@Bilal-Abdeen
Copy link
Contributor

Bilal-Abdeen commented Mar 12, 2024

Thank you for the excellent library.

I want to display the component in a row along with other components. Is this at all possible?

Using style style={{ flex: 1, flexDirection: "row", justifyContent: "flex-start", }} (as you can see below) makes the component SectionedMultiSelect shrink to only the caret!

Screenshot 2024-03-12 111613

It should be:
Screenshot 2024-03-12 113554

<View style={{ flex: 1, flexDirection: "row", justifyContent: "flex-start", }}>
	<SectionedMultiSelect
		IconRenderer={Icon}
                styles={{ selectToggle: { maxWidth: 100 }}} 
		items={[ {value: "value 1"}, {value: "value 2"}, ]}
		uniqueKey="value"
		displayKey="value"

		single={true}
		readOnlyHeadings={false} 

		hideSearch={false}
		hideConfirm={true}
		hideSubmitButton={true}
		canAddItems={false}

		onSelectedItemsChange={ (value) => { props.acPhoneCountryCode(value[0]);  }}
		selectedItems={[props.phoneCountryCode]} 
		selectText="Country Code"
	/>
	<Text>Hello</Text>
</View>
Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@renrizzolo
Copy link
Owner

I'm not entirely sure, but looking at your markup it might be just a case of adding an extra wrapper around the select, that has some width or flex value. Or maybe adding flexShrink: 0 or similar to selectToggle styles

Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label May 13, 2024
Copy link

This issue was closed because it has been stalled for 5 days with no activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants