Comments (13)
We definitely need a way to close the dropdown even if you don't select an option, either by clicking outside or via a cancel button
from react-native-multiple-select.
I just found this workaround using the component callbacks using the React functional component:
first, you have to wrap your main screen with the TouchableWithoutFeedback component.
const multiSelectRef = useRef();
const closeMultiSelectIfOpened = () => {
if (multiSelectRef.current.state.selector) {
multiSelectRef.current._toggleSelector();
}
}
return(
<TouchableWithoutFeedback onPress={closeMultiSelectIfOpened}>
<View style={styles.screen}>
<View style={{ flex: 1 }}>
<MultiSelect ref={multiSelectRef} ........ />
</View>
...............
</View>
</TouchableWithoutFeedback>
);
from react-native-multiple-select.
no work
from react-native-multiple-select.
Did you find a solution?
from react-native-multiple-select.
Is there any plan to fix this issue ?
from react-native-multiple-select.
Please use the latest version. There ought to be a dropdown icon that can be pressed to close the dropdown
from react-native-multiple-select.
@toystars, you mean 0.4.4
? I don't see one. Btw, I'm talking about single
mode.
from react-native-multiple-select.
@lucifurtun yes, the latest version is 0.4.4
. The close
icon should also work in single mode
from react-native-multiple-select.
@toystars, I don't see either the close icon, what's the prop i can use to close?
from react-native-multiple-select.
With hideSubmitButton
it allows closing the dropdown by tapping the arrow, but I am still looking for a way to automatically close it when tapping outside of the selection box
from react-native-multiple-select.
Is any body got solution?
from react-native-multiple-select.
I just found this workaround using the component callbacks using the React functional component:
first, you have to wrap your main screen with the TouchableWithoutFeedback component.const multiSelectRef = useRef(); const closeMultiSelectIfOpened = () => { if (multiSelectRef.current.state.selector) { multiSelectRef.current._toggleSelector(); } } return( <TouchableWithoutFeedback onPress={closeMultiSelectIfOpened}> <View style={styles.screen}> <View style={{ flex: 1 }}> <MultiSelect ref={multiSelectRef} ........ /> </View> ............... </View> </TouchableWithoutFeedback> );
i change to: <MultiSelect onToggleList={() => closeMultiSelectIfOpened()} ........ />
it work with me
from react-native-multiple-select.
I just found this workaround using the component callbacks using the React functional component: first, you have to wrap your main screen with the TouchableWithoutFeedback component.
const multiSelectRef = useRef(); const closeMultiSelectIfOpened = () => { if (multiSelectRef.current.state.selector) { multiSelectRef.current._toggleSelector(); } } return( <TouchableWithoutFeedback onPress={closeMultiSelectIfOpened}> <View style={styles.screen}> <View style={{ flex: 1 }}> <MultiSelect ref={multiSelectRef} ........ /> </View> ............... </View> </TouchableWithoutFeedback> );
its working but flatlist scroll working so slowly , anyone know ?
from react-native-multiple-select.
Related Issues (20)
- List items not clickable in android when component is absolute with zindex.
- Failed building javascript Bundle. Unable to resolve module react-native-multiple-select\index.js HOT 1
- Cannot select items while keyboard open HOT 1
- Search input autofocus not working in Android at first time multiselect click
- animate prop not working in latest version
- Is there a way to prevent the bounce up effect?
- Selected items are not displayed when transferring to data select
- Style Undefined Props error on using typescript + react native
- Text strings must be rendered within a <Text> component. HOT 1
- No type definition for `tagContainerStyle`
- Multiple select in ScrollView HOT 2
- Id of Deleted Item / Event when an unselect item from dropdown
- ViewPropTypes will be removed from React Native. Migrate to ViewPropTypes exported from 'deprecated-react-native-prop-types'. HOT 8
- add property tagContainerStyle
- Warning: Failed prop type: Invalid props.styleIndicator key `color` supplied to `MultiSelect` HOT 1
- multiselect in ScrollViews gives error HOT 1
- How to use a custom component (image, button) as a trigger for the dropdown? HOT 1
- Virtualised-list nesting problem in (replace Flatlist)
- Added submitButtonTextStyle, and submitButtonStyle
- hideSubmitButton was breaking the dropdown icon
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-multiple-select.