Fixed: Select all on Activity: Queue

pull/2984/head
Mark McDowall 6 years ago
parent 9b212d11f0
commit 728c0e8272

@ -3,6 +3,7 @@ import PropTypes from 'prop-types';
import React, { Component } from 'react'; import React, { Component } from 'react';
import hasDifferentItems from 'Utilities/Object/hasDifferentItems'; import hasDifferentItems from 'Utilities/Object/hasDifferentItems';
import getSelectedIds from 'Utilities/Table/getSelectedIds'; import getSelectedIds from 'Utilities/Table/getSelectedIds';
import removeOldSelectedState from 'Utilities/Table/removeOldSelectedState';
import selectAll from 'Utilities/Table/selectAll'; import selectAll from 'Utilities/Table/selectAll';
import toggleSelected from 'Utilities/Table/toggleSelected'; import toggleSelected from 'Utilities/Table/toggleSelected';
import { align, icons } from 'Helpers/Props'; import { align, icons } from 'Helpers/Props';
@ -61,7 +62,10 @@ class Queue extends Component {
componentDidUpdate(prevProps) { componentDidUpdate(prevProps) {
if (hasDifferentItems(prevProps.items, this.props.items)) { if (hasDifferentItems(prevProps.items, this.props.items)) {
this.setState({ selectedState: {} }); this.setState((state) => {
return removeOldSelectedState(state, prevProps.items);
});
return; return;
} }

@ -30,6 +30,7 @@ class TableHeaderCell extends Component {
const { const {
className, className,
name, name,
columnLabel,
isSortable, isSortable,
isVisible, isVisible,
isModifiable, isModifiable,
@ -49,10 +50,11 @@ class TableHeaderCell extends Component {
return ( return (
isSortable ? isSortable ?
<Link <Link
{...otherProps}
component="th" component="th"
className={className} className={className}
title={columnLabel}
onPress={this.onPress} onPress={this.onPress}
{...otherProps}
> >
{children} {children}
@ -75,7 +77,7 @@ class TableHeaderCell extends Component {
TableHeaderCell.propTypes = { TableHeaderCell.propTypes = {
className: PropTypes.string, className: PropTypes.string,
name: PropTypes.string.isRequired, name: PropTypes.string.isRequired,
label: PropTypes.oneOfType([PropTypes.string, PropTypes.object]), columnLabel: PropTypes.string,
isSortable: PropTypes.bool, isSortable: PropTypes.bool,
isVisible: PropTypes.bool, isVisible: PropTypes.bool,
isModifiable: PropTypes.bool, isModifiable: PropTypes.bool,

Loading…
Cancel
Save