Fixed: Don't convert artist/album selection filter to lower case in state

(cherry picked from commit ca52eb76ca2e286479f1803f399d5f5b563cfb41)

Closes #1857
pull/4546/head
Mark McDowall 4 years ago committed by Bogdan
parent 49883d0e30
commit 0bcbf9df81

@ -55,7 +55,7 @@ class SelectAlbumModalContent extends Component {
// Listeners // Listeners
onFilterChange = ({ value }) => { onFilterChange = ({ value }) => {
this.setState({ filter: value.toLowerCase() }); this.setState({ filter: value });
}; };
// //
@ -71,6 +71,7 @@ class SelectAlbumModalContent extends Component {
} = this.props; } = this.props;
const filter = this.state.filter; const filter = this.state.filter;
const filterLower = filter.toLowerCase();
return ( return (
<ModalContent onModalClose={onModalClose}> <ModalContent onModalClose={onModalClose}>
@ -107,7 +108,7 @@ class SelectAlbumModalContent extends Component {
<TableBody> <TableBody>
{ {
items.map((item) => { items.map((item) => {
return item.title.toLowerCase().includes(filter) ? return item.title.toLowerCase().includes(filterLower) ?
( (
<SelectAlbumRow <SelectAlbumRow
key={item.id} key={item.id}

@ -29,7 +29,7 @@ class SelectArtistModalContent extends Component {
// Listeners // Listeners
onFilterChange = ({ value }) => { onFilterChange = ({ value }) => {
this.setState({ filter: value.toLowerCase() }); this.setState({ filter: value });
}; };
// //
@ -43,6 +43,7 @@ class SelectArtistModalContent extends Component {
} = this.props; } = this.props;
const filter = this.state.filter; const filter = this.state.filter;
const filterLower = filter.toLowerCase();
return ( return (
<ModalContent onModalClose={onModalClose}> <ModalContent onModalClose={onModalClose}>
@ -69,7 +70,7 @@ class SelectArtistModalContent extends Component {
> >
{ {
items.map((item) => { items.map((item) => {
return item.artistName.toLowerCase().includes(filter) ? return item.artistName.toLowerCase().includes(filterLower) ?
( (
<SelectArtistRow <SelectArtistRow
key={item.id} key={item.id}

Loading…
Cancel
Save