Skip to content

Commit

Permalink
rename variables as requested from styleguide
Browse files Browse the repository at this point in the history
  • Loading branch information
gannunziata committed Jan 12, 2018
1 parent 720588c commit 7e961d1
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions source/Table/Table.js
Expand Up @@ -445,15 +445,15 @@ export default class Table extends PureComponent {

const style = this._cachedColumnStyles[columnIndex];

const colTitle = title ? title : (typeof renderedCell === 'string' ? renderedCell : null);
const columnTitle = title ? title : (typeof renderedCell === 'string' ? renderedCell : null);

const columnProps = {
role: 'gridcell',
'aria-describedby': id || undefined,
key: "Row" + rowIndex + "-" + "Col" + columnIndex,
className: cn('ReactVirtualized__Table__rowColumn', className),
style: style,
title: colTitle,
title: columnTitle,
};

// NOTE: is important to NOT mixin inline property and spread properties,
Expand Down Expand Up @@ -513,7 +513,7 @@ export default class Table extends PureComponent {



let chOnClick, cOnKeyDown, chTabIndex, ariaSort, ariaLabel;
let headerOnClick, headerOnKeyDown, headerTabIndex, headerAriaSort, headerAriaLabel;

if (sortEnabled || onHeaderClick) {
// If this is a sortable header, clicking it should update the table data's sorting.
Expand Down Expand Up @@ -542,24 +542,24 @@ export default class Table extends PureComponent {
}
};

ariaLabel = column.props['aria-label'] || label || dataKey;
chTabIndex = 0;
chOnClick = onClick;
chOnKeyDown = onKeyDown;
headerAriaLabel = column.props['aria-label'] || label || dataKey;
headerTabIndex = 0;
headerOnClick = onClick;
headerOnKeyDown = onKeyDown;
}

if (sortBy === dataKey) {
ariaSort = sortDirection === SortDirection.ASC ? 'ascending' : 'descending';
headerAriaSort = sortDirection === SortDirection.ASC ? 'ascending' : 'descending';
}

const headerProps = {
id: id || undefined,
role: 'columnheader',
'aria-label': ariaLabel,
'aria-sort': ariaSort,
tabIndex: chTabIndex,
onClick: chOnClick,
onKeyDown: chOnKeyDown,
'aria-label': headerAriaLabel,
'aria-sort': headerAriaSort,
tabIndex: headerTabIndex,
onClick: headerOnClick,
onKeyDown: headerOnKeyDown,
key: "Header-Col" + index,
className: classNames,
style: style,
Expand Down

0 comments on commit 7e961d1

Please sign in to comment.