Skip to content

Commit d2b2f9e

Browse files
committed
Minor update
1 parent 15f3887 commit d2b2f9e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/data-table/private/header-cell.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ class DataTableHeaderCell extends React.Component {
127127
const { fixedHeader, isSorted, label, sortable, width } = this.props;
128128

129129
const labelType = typeof label;
130-
const sortDirection = (!this.props.sortDirection && !this.state.sortDirection) ? this.props.firstSortDirection : (this.props.sortDirection || this.state.sortDirection);
130+
const sortDirection = (!this.props.sortDirection && !this.state.sortDirection && this.props.sortable) ? this.props.firstSortDirection : (this.props.sortDirection || this.state.sortDirection);
131131
const expandedSortDirection =
132132
sortDirection === 'desc' ? 'descending' : 'ascending';
133133
const ariaSort = isSorted ? expandedSortDirection : 'none';
@@ -157,7 +157,7 @@ class DataTableHeaderCell extends React.Component {
157157
name={sortDirection === 'desc' ? 'arrowdown' : 'arrowup'}
158158
size="x-small"
159159
/>
160-
{(sortDirection && this.state.sortable) ? (
160+
{sortDirection ? (
161161
<span
162162
className="slds-assistive-text"
163163
aria-live="assertive"

0 commit comments

Comments
 (0)