This commit is contained in:
aglowinthefield 2025-11-30 23:52:45 +00:00 committed by GitHub
commit bd29a52005
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 6 deletions

View file

@ -5,7 +5,7 @@ import { connect } from 'react-redux';
import { createSelector } from 'reselect'; import { createSelector } from 'reselect';
import shortenList from 'Utilities/String/shortenList'; import shortenList from 'Utilities/String/shortenList';
import titleCase from 'Utilities/String/titleCase'; import titleCase from 'Utilities/String/titleCase';
import SelectInput from './SelectInput'; import EnhancedSelectInput from './EnhancedSelectInput';
function createMapStateToProps() { function createMapStateToProps() {
return createSelector( return createSelector(
@ -29,7 +29,8 @@ function createMapStateToProps() {
`${disambiguation ? ' (' : ''}${titleCase(disambiguation)}${disambiguation ? ')' : ''}` + `${disambiguation ? ' (' : ''}${titleCase(disambiguation)}${disambiguation ? ')' : ''}` +
`, ${mediumCount} med, ${trackCount} tracks` + `, ${mediumCount} med, ${trackCount} tracks` +
`${country && country.length > 0 ? `, ${shortenList(country)}` : ''}` + `${country && country.length > 0 ? `, ${shortenList(country)}` : ''}` +
`${format ? `, [${format}]` : ''}` `${format ? `, [${format}]` : ''}`,
hint: `MBID: ${foreignReleaseId.toString().slice(0, 8)}...`
}; };
}); });
@ -64,7 +65,7 @@ class AlbumReleaseSelectInputConnector extends Component {
render() { render() {
return ( return (
<SelectInput <EnhancedSelectInput
{...this.props} {...this.props}
onChange={this.onChange} onChange={this.onChange}
/> />

View file

@ -1,7 +1,7 @@
import _ from 'lodash'; import _ from 'lodash';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import React, { Component } from 'react'; import React, { Component } from 'react';
import SelectInput from 'Components/Form/SelectInput'; import EnhancedSelectInput from 'Components/Form/EnhancedSelectInput';
import TableRowCell from 'Components/Table/Cells/TableRowCell'; import TableRowCell from 'Components/Table/Cells/TableRowCell';
import TableRow from 'Components/Table/TableRow'; import TableRow from 'Components/Table/TableRow';
import shortenList from 'Utilities/String/shortenList'; import shortenList from 'Utilities/String/shortenList';
@ -55,7 +55,7 @@ class SelectAlbumReleaseRow extends Component {
if (name === 'release') { if (name === 'release') {
return ( return (
<TableRowCell key={name}> <TableRowCell key={name}>
<SelectInput <EnhancedSelectInput
name={id.toString()} name={id.toString()}
values={_.map(releases, (r) => ({ values={_.map(releases, (r) => ({
key: r.id, key: r.id,
@ -64,7 +64,8 @@ class SelectAlbumReleaseRow extends Component {
`, ${r.mediumCount} med, ${r.trackCount} tracks` + `, ${r.mediumCount} med, ${r.trackCount} tracks` +
`${r.country.length > 0 ? ', ' : ''}${shortenList(r.country)}` + `${r.country.length > 0 ? ', ' : ''}${shortenList(r.country)}` +
`${r.format ? ', [' : ''}${r.format}${r.format ? ']' : ''}` + `${r.format ? ', [' : ''}${r.format}${r.format ? ']' : ''}` +
`${r.monitored ? ', Monitored' : ''}` `${r.monitored ? ', Monitored' : ''}`,
hint: `MBID: ${r.id.toString().slice(0, 8)}...`
}))} }))}
value={matchedReleaseId} value={matchedReleaseId}
onChange={this.onInputChange} onChange={this.onInputChange}