-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat <DateRangePicker />
#1369
feat <DateRangePicker />
#1369
Conversation
🦋 Changeset detectedLatest commit: dab5c64 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Deploy Preview for ingred-ui ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
DateRangePicker について、社内で以前話し合ったしようで以下のようなものがある。
というのがあるけど、日付は現状の実装だと即時反映になっている。 |
これについてどう対応しようかと思ってるけど、パッと思いつく唯一の解決方法は CalendarRange 単体で機能することを諦めて、使う側でよしなにしてねに振り切ることだと思ってる |
/** | ||
* 親コンポーネントで calendar を任意のタイミングで閉じたい場合に使用する | ||
*/ | ||
onClose?: (clickState: "start" | "end") => void; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
オプショナルで onDatesChange が発火したときに差し込めるハンドラーを定義した。
#1369 (comment)
const handleClose = (clickState: "start" | "end") => { | ||
if (clickState === "end") { | ||
setOpen(false); | ||
} | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
こんな感じで指定すると終了日をクリックしたタイミングで閉じることができるようになる。
親コンポーネントの都合であまり props 生やしたくないけど、ひとまずこの対応で。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
#975