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

Drop down item becomes un-pressable when wrapping in a view with testID #564

Closed
Jad-Jbara opened this issue May 31, 2022 · 1 comment
Closed

Comments

@Jad-Jbara
Copy link

Jad-Jbara commented May 31, 2022

I have a large pressable container which contains a dropdown that is wrapped in a view.
The following works completely fine:

<View style={styles.row}>
            <DropDown
              key={`drop_down_${id}_${myStatus}`}
              items={ITEMS}
              open={isOpen}
              setOpen={setOpen}
              onChangeValue={onValueChange}
              style={styles.dropDown}
              containerStyle={styles.dropDownContainer}
              renderListItem={renderListItem}
            />
            ...
        </View>

However the following causes the drop down item not to be pressable and makes the parent's touchable area have precedence (ie the large pressable container)

<View testID='dropdown_container' style={styles.row}>
            <DropDown
              key={`drop_down_${id}_${myStatus}`}
              items={ITEMS}
              open={isOpen}
              setOpen={setOpen}
              onChangeValue={onValueChange}
              style={styles.dropDown}
              containerStyle={styles.dropDownContainer}
              renderListItem={renderListItem}
            />
        </View>
@hossein-zare
Copy link
Owner

See: #450 (comment) and #376

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

No branches or pull requests

2 participants