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

refactor: use react hooks to refactor Table #232

Merged
merged 3 commits into from
Aug 12, 2021
Merged

Conversation

simonguo
Copy link
Member

@simonguo simonguo commented Aug 5, 2021

Bug Fixes

Breaking change

Deprecated onDataUpdated.

onDataUpdated is an anti-pattern usage and will no longer be supported in subsequent versions.

Deprecated bodyRef.

For some components to be rendered inside the table, the body container of the table can be obtained through bodyRef. We can get the container directly through the ref of the Table, and the bodyRef is redundant.

Before:

const ref = uesRef();
return (
  <>
    <Table
      bodyRef={body => {
        ref.current = body;
      }}
    />
    <CheckPicker container={() => bodyRef.current} />
  </>
);

After:

const ref = uesRef();
return (
  <>
    <Table ref={tableRef} />
    <CheckPicker container={() => ref.current.body} />
  </>
);

@lgtm-com
Copy link
Contributor

lgtm-com bot commented Aug 5, 2021

This pull request fixes 1 alert when merging 5bc4896 into d44e467 - view on LGTM.com

fixed alerts:

  • 1 for Unsupported state update in lifecycle method

@lgtm-com
Copy link
Contributor

lgtm-com bot commented Aug 6, 2021

This pull request fixes 1 alert when merging e84dcbd into d44e467 - view on LGTM.com

fixed alerts:

  • 1 for Unsupported state update in lifecycle method

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

Successfully merging this pull request may close these issues.

Create onRowDoubleClick event for table row
1 participant