about summary refs log tree commit diff
path: root/app/javascript/mastodon/features/ui/components/column.js
diff options
context:
space:
mode:
authorbeatrix <beatrix.bitrot@gmail.com>2017-09-30 15:02:21 -0400
committerGitHub <noreply@github.com>2017-09-30 15:02:21 -0400
commitb1217242fc3949b9a9fbee3e654fd16a0abd8a03 (patch)
treeedb9b554e13c0cca3cd5ac98949181c61b93f79a /app/javascript/mastodon/features/ui/components/column.js
parent5dec67d96441f9ec41cad82474ca6364f5fd4160 (diff)
parentb6bf04ece2e0e9602a84ef48fe6a04f505680c03 (diff)
Merge pull request #125 from glitch-soc/data-column
Add data-column="..." to all columns
Diffstat (limited to 'app/javascript/mastodon/features/ui/components/column.js')
-rw-r--r--app/javascript/mastodon/features/ui/components/column.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/javascript/mastodon/features/ui/components/column.js b/app/javascript/mastodon/features/ui/components/column.js
index 15538ea38..c1700f86e 100644
--- a/app/javascript/mastodon/features/ui/components/column.js
+++ b/app/javascript/mastodon/features/ui/components/column.js
@@ -13,6 +13,7 @@ export default class Column extends React.PureComponent {
     children: PropTypes.node,
     active: PropTypes.bool,
     hideHeadingOnMobile: PropTypes.bool,
+    name: PropTypes.string,
   };
 
   handleHeaderClick = () => {
@@ -47,7 +48,7 @@ export default class Column extends React.PureComponent {
   }
 
   render () {
-    const { heading, icon, children, active, hideHeadingOnMobile } = this.props;
+    const { heading, icon, children, active, hideHeadingOnMobile, name } = this.props;
 
     const showHeading = heading && (!hideHeadingOnMobile || (hideHeadingOnMobile && !isMobile(window.innerWidth)));
 
@@ -59,6 +60,7 @@ export default class Column extends React.PureComponent {
       <div
         ref={this.setRef}
         role='region'
+        data-column={name}
         aria-labelledby={columnHeaderId}
         className='column'
         onScroll={this.handleScroll}