mirror of
https://github.com/Lidarr/Lidarr
synced 2026-01-06 15:43:52 +01:00
Utilize hinted select for MBID
This commit is contained in:
parent
3ac47f83ec
commit
f5b7a4036c
2 changed files with 8 additions and 8 deletions
|
|
@ -5,7 +5,7 @@ import { connect } from 'react-redux';
|
|||
import { createSelector } from 'reselect';
|
||||
import shortenList from 'Utilities/String/shortenList';
|
||||
import titleCase from 'Utilities/String/titleCase';
|
||||
import SelectInput from './SelectInput';
|
||||
import EnhancedSelectInput from './EnhancedSelectInput';
|
||||
|
||||
function createMapStateToProps() {
|
||||
return createSelector(
|
||||
|
|
@ -29,8 +29,8 @@ function createMapStateToProps() {
|
|||
`${disambiguation ? ' (' : ''}${titleCase(disambiguation)}${disambiguation ? ')' : ''}` +
|
||||
`, ${mediumCount} med, ${trackCount} tracks` +
|
||||
`${country && country.length > 0 ? `, ${shortenList(country)}` : ''}` +
|
||||
`${format ? `, [${format}]` : ''}` +
|
||||
`, [...${foreignReleaseId.toString().slice(-4)}]`
|
||||
`${format ? `, [${format}]` : ''}`,
|
||||
hint: `MBID: ${foreignReleaseId.toString().slice(0, 8)}`
|
||||
};
|
||||
});
|
||||
|
||||
|
|
@ -65,7 +65,7 @@ class AlbumReleaseSelectInputConnector extends Component {
|
|||
render() {
|
||||
|
||||
return (
|
||||
<SelectInput
|
||||
<EnhancedSelectInput
|
||||
{...this.props}
|
||||
onChange={this.onChange}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import _ from 'lodash';
|
||||
import PropTypes from 'prop-types';
|
||||
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 TableRow from 'Components/Table/TableRow';
|
||||
import shortenList from 'Utilities/String/shortenList';
|
||||
|
|
@ -55,7 +55,7 @@ class SelectAlbumReleaseRow extends Component {
|
|||
if (name === 'release') {
|
||||
return (
|
||||
<TableRowCell key={name}>
|
||||
<SelectInput
|
||||
<EnhancedSelectInput
|
||||
name={id.toString()}
|
||||
values={_.map(releases, (r) => ({
|
||||
key: r.id,
|
||||
|
|
@ -64,8 +64,8 @@ class SelectAlbumReleaseRow extends Component {
|
|||
`, ${r.mediumCount} med, ${r.trackCount} tracks` +
|
||||
`${r.country.length > 0 ? ', ' : ''}${shortenList(r.country)}` +
|
||||
`${r.format ? ', [' : ''}${r.format}${r.format ? ']' : ''}` +
|
||||
`${r.monitored ? ', Monitored' : ''}` +
|
||||
`, [...${r.id.toString().slice(-4)}]`
|
||||
`${r.monitored ? ', Monitored' : ''}`,
|
||||
hint: `MBID: ${r.id.toString().slice(0, 8)}`
|
||||
}))}
|
||||
value={matchedReleaseId}
|
||||
onChange={this.onInputChange}
|
||||
|
|
|
|||
Loading…
Reference in a new issue