Skip to content

How to avoid default undefined parameters in various components? #3517

@psk-dreampay

Description

@psk-dreampay

I just upgrade the react native paper version to 5.0.1. Everything else seems fine but how can I avoid some compulsory parameters where the value of these parameters can be undefined. To give more details when working checkbox the following code was working properly before this update:

<Checkbox.Android status={status} onPress={onPress} disabled={disabled} testID={testID} theme={theme} uncheckedColor={uncheckedColor} color={color} />

But after the update I have to pass some additional parameters as follows:

<Checkbox.Android status={status} onPress={onPress} disabled={disabled} testID={testID} theme={theme} uncheckedColor={uncheckedColor} color={color} // new params accessibilityLabelledBy={undefined} accessibilityLanguage={undefined} onPointerEnter={undefined} onPointerEnterCapture={undefined} onPointerLeave={undefined} onPointerLeaveCapture={undefined} onPointerMove={undefined} onPointerMoveCapture={undefined} onPointerCancel={undefined} onPointerCancelCapture={undefined} onPointerDown={undefined} onPointerDownCapture={undefined} onPointerUp={undefined} onPointerUpCapture={undefined} onHoverIn={undefined} onHoverOut={undefined} delayHoverIn={undefined} delayHoverOut={undefined} />
Anything we can do here to just skip this parameters. This is happening with other components as well like
Fab, HelperText, IconButton, RadioButton, TextInput, AppBar.BackAction and TextInput.Icon.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionQuestion related to the library, not an issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions