Skip to content
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

<DataTable />でデフォルトチェックを有効にする #399

Merged
merged 1 commit into from
Jun 25, 2021

Conversation

youchann
Copy link
Contributor

@youchann youchann commented Jun 25, 2021

  • 加えて行をクリックしたときにチェックするか否かも制御できるように
  • Storybookを.tsxに書き換える

@youchann youchann requested a review from a team as a code owner June 25, 2021 08:54
@youchann youchann requested review from ryokosuge and removed request for a team June 25, 2021 08:54
@netlify
Copy link

netlify bot commented Jun 25, 2021

✔️ Deploy Preview for ingred-ui ready!

🔨 Explore the source changes: c97653d

🔍 Inspect the deploy log: https://app.netlify.com/sites/ingred-ui/deploys/60d599c78ed0bb00080cde93

😎 Browse the preview: https://deploy-preview-399--ingred-ui.netlify.app/iframe

{(args) => (
<DataTable
data={data.slice(0, 4)}
columns={[
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

一瞬undefinedが入るようになっていて、そのせいでエラーが起きるようになっていた........
mdxやめたい.......:bow:

* Not rerender when this prop is updated because it is used for initial value of state.
* **Please use with `onSelectRowChange={true}`.**
*/
defaultSelectedRow?: number;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Storybook上でも確認できる

Comment on lines +474 to +476
{...(!disableCheckWhenClickRow && {
onClick: handleSelectCheckbox(item.id),
})}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

undefined書きたくないときの方法

@youchann
Copy link
Contributor Author

@ryokosuge
既存のバージョンに影響を与えない変更ですmm

@youchann
Copy link
Contributor Author

youchann commented Jun 25, 2021

@deatiger 結局自分で書いてしまいましたmm

加えて行をクリックしたときにチェックするか否かも制御できるように

Copy link
Contributor

@ryokosuge ryokosuge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@youchann youchann merged commit 719f3f8 into master Jun 25, 2021
@youchann youchann deleted the datatable-add-default-check branch June 25, 2021 09:08
@deatiger
Copy link
Collaborator

@deatiger 結局自分で書いてしまいましたmm

加えて行をクリックしたときにチェックするか否かも制御できるように

ありがとうございます!素敵実装です👏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants