Cannot read properties of undefined (reading 'isValidate')
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 活発
- 技術スタック
- javascript, react
- 領域
- frontend
調査の方向性
まず、rc-picker 4.11.3、dayjs 1.11.5、React 18.2.0 を使用して、提供された rc-picker の例を再現します。示されている TimePicker コンポーネントをエントリーポイントとして、useFieldsInvalidate と Day.js 統合を通じてスタックを追跡します。TimePicker がレンダリングされ、isValidate TypeError なしで選択を処理できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Cannot read properties of undefined (reading 'isValidate')
TypeError: Cannot read properties of undefined (reading 'isValidate')
at Object.current (http://localhost:3000/static/js/vendors-node_modules_dayjs_plugin_isSameOrAfter_js-node_modules_dayjs_plugin_isSameOrBefore_j-8f3d56.chunk.js:9228:21)
at http://localhost:3000/static/js/vendors-node_modules_dayjs_plugin_isSameOrAfter_js-node_modules_dayjs_plugin_isSameOrBefore_j-8f3d56.chunk.js:14134:114
at http://localhost:3000/static/js/vendors-node_modules_dayjs_plugin_isSameOrAfter_js-node_modules_dayjs_plugin_isSameOrBefore_j-8f3d56.chunk.js:8996:22
at Array.map (<anonymous>)
at http://localhost:3000/static/js/vendors-node_modules_dayjs_plugin_isSameOrAfter_js-node_modules_dayjs_plugin_isSameOrBefore_j-8f3d56.chunk.js:8978:30
at mountMemo (http://localhost:3000/static/js/bundle.js:165672:23)
at Object.useMemo (http://localhost:3000/static/js/bundle.js:166057:20)
at Object.useMemo (http://localhost:3000/static/js/bundle.js:191308:25)
at useFieldsInvalidate (http://localhost:3000/static/js/vendors-node_modules_dayjs_plugin_isSameOrAfter_js-node_modules_dayjs_plugin_isSameOrBefore_j-8f3d56.chunk.js:8977:62)
at Picker (http://localhost:3000/static/js/vendors-node_modules_dayjs_plugin_isSameOrAfter_js-node_modules_dayjs_plugin_isSameOrBefore_j-8f3d56.chunk.js:8351:101)
rc-picker v.4.11.3
"dayjs": "^1.11.5",
"react-dom": "^18.2.0",
"react": "^18.2.0",
import React, { useState } from 'react'
import dayjs from 'dayjs'
import customParseFormat from 'dayjs/plugin/customParseFormat'
import isSameOrAfter from 'dayjs/plugin/isSameOrAfter'
import isSameOrBefore from 'dayjs/plugin/isSameOrBefore'
import Picker from 'rc-picker'
import 'rc-picker/assets/index.css'
import enUS from 'rc-picker/lib/locale/en_US'
dayjs.extend(customParseFormat)
dayjs.extend(isSameOrAfter)
dayjs.extend(isSameOrBefore)
const TimePicker = ({ currentCompany }) => {
const defaultValue = dayjs()
const [value, setValue] = useState(defaultValue)
const onSelect = newValue => {
if (newValue && dayjs.isDayjs(newValue)) {
console.log('Select:', newValue)
}
}
const onChange = newValue => {
if (newValue && dayjs.isDayjs(newValue)) {
console.log('Change:', newValue)
setValue(newValue)
}
}
const sharedProps = {
value: value || defaultValue,
onSelect,
onChange
}
return (
<div className='App'>
<h3>RC Time Picker with DayJS</h3>
<Picker
mode='time'
{...sharedProps}
locale={enUS}
defaultValue={defaultValue}
format='HH:mm' // Define how the date should be displayed
/>
<div style={{ marginTop: 20 }}>
<p>
Selected Date:{' '}
{value
? value.format('YYYY-MM-DD')
: defaultValue.format('YYYY-MM-DD')}
</p>
</div>
</div>
)
}
export default TimePicker
- 主要言語
- TypeScript
- スター
- 306
- フォーク
- 356
- 平均マージ
- 1時間 42分
- マージ済み PR(30日)
- 1
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
react-component/picker のほかの issue
-
SinglePickerPanelProps incorrectly extends BasePickerPanelProps under exactOptionalPropertyTypesオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
react-component/picker#1026 ·
-
Disabled date entered manually is not reverted on blur対応中かも @Ye-YiChen が 53 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
react-component/picker#1018 · コメント 2 件 ·
-
enter date manually in format YY prevent the user to add YYYY対応中かも @nrps9909 が 98 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
react-component/picker#956 · コメント 1 件 · リアクション 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 30/100
react-component/picker#955 · コメント 1 件 · リアクション 1 件 ·
-
[Bug / DX]: Deep imports for generateConfig are incompatible with pnpm and break module resolution対応中かも @DanielChutkowskiJMMJ が 380 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 58/100
react-component/picker#949 ·
react-component/picker の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
Chocobozzz/PeerTube#7901 ·
メンテナーはふだん 3 日以内に返信
-
area:tools bug has repro
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
anthropics/claude-code#113984 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
ehmpathy/declapract-typescript-ehmpathy#960 ·
メンテナーはふだん 1 日以内に返信
-
area/web platform/windows type/bug version/v2
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
anomalyco/opencode#68237 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100