-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(component): Add drag and drop support to table component (#484)
- Loading branch information
1 parent
b4cceb8
commit c29d8bf
Showing
12 changed files
with
281 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,17 @@ | ||
import React, { memo, TableHTMLAttributes } from 'react'; | ||
import React, { forwardRef, memo, TableHTMLAttributes } from 'react'; | ||
|
||
import { StyledTableBody } from './styled'; | ||
|
||
export interface BodyProps extends TableHTMLAttributes<HTMLTableSectionElement> { | ||
withFirstRowBorder?: boolean; | ||
} | ||
|
||
export const Body: React.FC<BodyProps> = memo(({ className, style, ...props }) => <StyledTableBody {...props} />); | ||
interface PrivateProps { | ||
forwardedRef?: React.Ref<HTMLTableSectionElement>; | ||
} | ||
|
||
const RawBody: React.FC<BodyProps & PrivateProps> = (props) => <StyledTableBody ref={props.forwardedRef} {...props} />; | ||
|
||
export const Body = memo( | ||
forwardRef<HTMLTableSectionElement, BodyProps>((props, ref) => <RawBody {...props} forwardedRef={ref} />), | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.