Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Incorrect typing for trigger prop -- should be ActionType | ActionType[]

オープン
#209 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
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

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

react-component/tooltip のほかの issue

react-component/tooltip の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。