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

No cancel button on Picker component #2557

Closed
5 tasks
castusoft opened this issue Apr 15, 2023 · 2 comments
Closed
5 tasks

No cancel button on Picker component #2557

castusoft opened this issue Apr 15, 2023 · 2 comments
Assignees
Labels
bug a bug in one of the components waiting-for-response

Comments

@castusoft
Copy link

Picker's useWheelPicker modal is missing cancelLabel button even if I set it. Plus no matter how I apply styles, it is not getting it.

<Picker
            label="Trip type"
            useWheelPicker
            value={tripType}
            onChange={nativePickerValue => setTripType(nativePickerValue)}
            trailingAccessory={<ReloadSvg width={24} height={24} fill='black'/>}
            containerStyle={{borderWidth: 1, borderColor: Colors.grey50, padding: 3}}
            topBarProps={{
              doneLabel: 'Ok',
              cancelLabel: 'NO',
              title: 'Trip type',
              useSafeArea: true,
              includeStatusBar: true,
              titleStyle: {color: 'red'},
              containerStyle: {backgroundColor: 'red'}
          }}
          >
            {_.map(options, option => (
              <Picker.Item key={option.value} value={option.value} label={option.label} disabled={option.disabled}/>
            ))}
          </Picker>

Related to

  • [ x ] Components
  • Demo
  • Docs
  • Typings

Screenshots/Video

IMG_5B7E5B224ACF-1

Environment

  • React Native version: 0.71.6
  • React Native UI Lib version: ^7.2.4

Affected platforms

  • Android
  • [ x ] iOS
  • Web
@castusoft castusoft added the bug a bug in one of the components label Apr 15, 2023
@kilimchoi
Copy link

is there a way to style the OK button? it's shifted to the right too much.

@ethanshar
Copy link
Collaborator

@kilimchoi Have you tried passing doneButtonProps in topBarProps?

@castusoft You need to pass a callback to onCancel in topBarProps in order for it to be rendered

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug a bug in one of the components waiting-for-response
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants