Skip to content

Extend return type of SelectRenderCounter in gravity-ui #36

@Nowely

Description

@Nowely

Objective

Instead of
type SelectRenderCounter = (originalComponent: React.ReactElement<SelectCounterProps>, counterProps: SelectCounterProps) => React.ReactElement;
It can be
type SelectRenderCounter = (originalComponent: React.ReactElement<SelectCounterProps>, counterProps: SelectCounterProps) => React.ReactNode;

Because counter can be in some cases null or just number.

Solution Proposal

Change return type from React.ReactElement to React.ReactNode

Definition of done

Changed type
Added to documentation the renderCounter prop description

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions