Skip to content
This repository was archived by the owner on Jun 15, 2022. It is now read-only.
This repository was archived by the owner on Jun 15, 2022. It is now read-only.

useTypedController render prop signature does not contain name and ref props #29

@lionskape

Description

@lionskape

Here is the root of the problem:

strictly-typed/src/types.ts

Lines 145 to 149 in 382a93a

render?: (props: {
onChange: (...event: any[]) => void;
onBlur: () => void;
value: DeepPathValue<TFieldValues, TFieldName>;
}) => React.ReactElement;

Expected behavior:
render function argument contains name ref declaration

Current behavior:
render function argument does not contain ref and name declaration

Probably solution should look like this:

    render?: (props: {
      onChange: (...event: any[]) => void;
      onBlur: () => void;
      value: DeepPathValue<TFieldValues, TFieldName>;
      name: TFieldName;
      ref: React.MutableRefObject<TAs>;
    }) => React.ReactElement;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions