bug: ion-datetime (and other components) throw `instance[watchMethodName] is not a function` when used inside inline IonModal (React)

オープン
#30,925 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
42/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
react, typescript
領域
frontend

調査の方向性

まず、isOpen、min、value について示されている prop の組み合わせを使って、報告された IonModal と IonDatetime を使用する React の例を実行します。影響を受けるコンポーネント全体で overlay 関連のコンポーネント動作を追跡し、サポートされる結果が安全な prop の更新なのか、サポートされていないパターンの文書化なのかを判断します。再現時に例外が発生しなくなるか、その制限が明確に文書化されれば完了です。

索引モデルが issue の本文から書いたものです。

説明

package: core stencil type: bug
Prerequisites
Ionic Framework Version

v7.x

Current Behavior
TypeError: instance[watchMethodName] is not a function
    at Datetime.set [as min]
    at attributeChangedCallback
Expected Behavior

Ionic components should not throw runtime errors when used inside IonModal, even when controlled via React props.

At minimum:
• setting props like min, value, or isOpen should be safe
• or Ionic should document that this pattern is unsupported

Steps to Reproduce
const Example = () => {
  const [open, setOpen] = useState(true);

  return (
    <IonModal isOpen={open}>
      <IonDatetime
        presentation="date"
        min="2026-01-19"
        value="2026-01-20"
      />
    </IonModal>
  );
};
Code Reproduction URL

null

Ionic Info

This affects multiple components that using Overlay

Additional Information

No response

主要言語
TypeScript
スター
52.8k
フォーク
13.3k
平均マージ
3日 1時間
マージ済み PR(30日)
86

環境構築

はじめの一歩

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

ionic-team/ionic-framework のほかの issue

ionic-team/ionic-framework の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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