8000 adds ID as a prop for component · dasveloper/react-sortablejs@cab96ba · GitHub
[go: up one dir, main page]

Skip to content

Commit cab96ba

Browse files
author
Wayne Van Son
committed
adds ID as a prop for component
1 parent d2b582c commit cab96ba

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/react-sortable.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ export class ReactSortable<T extends ItemInterface> extends Component<
5454
}
5555

5656
render() {
57-
const { tag, style, className } = this.props;
58-
const classicProps = { style, className };
57+
const { tag, style, className, id } = this.props;
58+
const classicProps = { style, className,id };
5959

6060
/** if no tag, default to a `div` element */
6161
const newTag = !tag || tag === null ? "div" : tag;

src/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ export interface ReactSortableProps<T> extends ReactSortableOptions {
3737
tag?: ForwardRefExoticComponent<RefAttributes<any>> | keyof ReactHTML;
3838
style?: CSSProperties;
3939
className?: string;
40+
id?: string;
4041
/**
4142
* Parse the plugins you'd like to use in Sortable.
4243
*/

0 commit comments

Comments
 (0)
0