Incorrect typing for trigger prop -- should be ActionType | ActionType[]
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 50/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
- 技術スタック
- react, typescript
- 領域
- frontend
調査の方向性
src/Tooltip.tsx から始め、src/index.tsx で rc-trigger に対して示されている ActionType | ActionType[] の定義と、その trigger prop を比較します。tooltip prop が単一のアクションと配列の両方を受け付けることを確認し、値が型エラーなしで Trigger に渡されることを検証します。
索引モデルが issue の本文から書いたものです。
説明
According to rc-trigger > src > index.tsx, the action prop should allow an ActionType or an ActionType[]:
export interface TriggerProps {
children: React.ReactElement;
action?: ActionType | ActionType[];
However, the trigger prop of rc-tooltip, which gets passed to the action prop of rc-trigger, only allows a single ActionType (not an array). Here is the relevant code from rc-tooltip > src > Tooltip.tsx:
export interface TooltipProps extends Pick<TriggerProps, 'onPopupAlign' | 'builtinPlacements'> {
trigger?: ActionType;
// ...
return (
<Trigger
popupClassName={overlayClassName}
prefixCls={prefixCls}
popup={getPopupElement}
action={trigger}
(Note: I came across this problem via Ant Design's Tooltip component, which depends on rc-tooltip.)
- 主要言語
- TypeScript
- スター
- 944
- フォーク
- 199
- 平均マージ
- 19時間 1分
- マージ済み PR(30日)
- 3
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
react-component/tooltip のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 64/100
react-component/tooltip#510 · コメント 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
react-component/tooltip#499 · コメント 1 件 · リアクション 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
react-component/tooltip#488 · コメント 4 件 · リアクション 2 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
react-component/tooltip#487 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
react-component/tooltip#483 ·
react-component/tooltip の issue をすべて見る
似ている issue
-
VerificationGate: ATTRIBUTION quote guard never matches a normal quotation (\b around the quote) オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
danielmiessler/LifeOS#2234 ·
-
T: Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
-
Mend: dependency security vulnerability untriaged
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100