Skip to content

Commit

Permalink
feat(table): adding data-column-id attribute to td and th elements
Browse files Browse the repository at this point in the history
  • Loading branch information
afshinm committed Aug 28, 2020
1 parent f7521a5 commit 59b49a4
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 31 deletions.
18 changes: 9 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"autoprefixer": "^9.8.0",
"axe-core": "^4.0.0",
"enzyme": "^3.11.0",
"enzyme-adapter-preact-pure": "^2.2.0",
"enzyme-adapter-preact-pure": "^2.2.3",
"eslint": "~6.8.0",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-jest": "~23.20.0",
Expand All @@ -45,12 +45,12 @@
"jsdom-global": "^3.0.2",
"lerna-changelog": "^1.0.1",
"node-sass": "^4.14.1",
"node-sass-chokidar": "^1.4.0",
"node-sass-chokidar": "^1.5.0",
"prettier": "~2.1.0",
"rimraf": "~3.0.2",
"rollup": "^2.11.2",
"rollup-plugin-postcss": "^3.1.1",
"rollup-plugin-sizes": "^1.0.2",
"rollup-plugin-sizes": "^1.0.3",
"rollup-plugin-terser": "^7.0.0",
"rollup-plugin-typescript2": "^0.27.1",
"source-map-loader": "^0.2.4",
Expand All @@ -71,8 +71,8 @@
"author": "Afshin Mehrabani <[email protected]>",
"license": "MIT",
"dependencies": {
"preact": "^10.4.4",
"tslib": "~2.0.0"
"preact": "^10.4.8",
"tslib": "^2.0.1"
},
"changelog": {
"labels": {
Expand Down
1 change: 1 addition & 0 deletions src/view/table/td.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export class TD extends BaseComponent<TDProps, {}> {
<td
role={this.props.role}
colSpan={this.props.colSpan}
data-column-id={this.props.column && this.props.column.id}
className={classJoin(
className('td'),
this.props.className,
Expand Down
1 change: 1 addition & 0 deletions src/view/table/th.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export class TH extends BaseComponent<THProps, {}> {

return (
<th
data-column-id={this.props.column && this.props.column.id}
className={classJoin(
className('th'),
this.isSortable() ? className('th', 'sort') : null,
Expand Down
Loading

0 comments on commit 59b49a4

Please sign in to comment.