react-component / react-component/dropdown

Adding additional props from rc-trigger will break current typescript declare

Open
#99 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
181
Forks
112
Avg merge
12h 52m
Merged PRs (30d)
2

Description

Hi, I currently want to use forceRender prop from rc-trigger in my dropdown. However, when I add the props to my current dropdown, typescript will cause errors because forceRender is not a prop of the dropdown component.

Screen Shot 2020-04-09 at 11 15 30
In the typescript, I just wonder why do we only Pick 'getPopupContainer' | 'children' from TriggerProps ?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Inspect the dropdown component's TypeScript declaration where TriggerProps is limited to 'getPopupContainer' and 'children'. Check how rc-trigger props are exposed, then verify that using forceRender on the dropdown no longer produces a TypeScript error.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.