Skip to content

Commit 0bd1493

Browse files
committed
Fix #5521
1 parent a663404 commit 0bd1493

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

src/shared/components/Contentful/TracksFilter/TracksFilter.jsx

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,16 @@ export class TracksFilterInner extends Component {
5050
const { authorList } = this.state;
5151
this.setState({
5252
authorList: _.concat(authorList, _.map(
53-
_.sortBy(results.items, i => i.fields.name.toLowerCase()),
54-
item => ({ label: item.fields.name, selected: false }),
53+
_.sortBy(
54+
results.items,
55+
i => (i.fields.tcHandle
56+
? i.fields.tcHandle.toLowerCase() : i.fields.name.toLowerCase()),
57+
),
58+
item => ({
59+
label: item.fields.tcHandle
60+
? item.fields.tcHandle : item.fields.name,
61+
selected: false,
62+
}),
5563
)),
5664
});
5765
}
@@ -149,6 +157,7 @@ export class TracksFilterInner extends Component {
149157
{mediaMatches => (
150158
<Dropdown
151159
label="Authors"
160+
placeholder="Type author name or handle"
152161
options={updatedAuthorList}
153162
size="xs"
154163
onChange={(authors) => {
@@ -231,8 +240,8 @@ export class TracksFilterInner extends Component {
231240
TracksFilterInner.defaultProps = {
232241
onClose: () => {},
233242
onApply: () => {},
234-
selectedAuthor: DEF_SELECTED_AUTHOR,
235-
authorList: [{ label: DEF_SELECTED_AUTHOR, selected: true }],
243+
selectedAuthor: '',
244+
authorList: [{ label: DEF_SELECTED_AUTHOR, selected: false }],
236245
startDate: moment('2001-01-02'),
237246
endDate: moment(),
238247
tags: [],

0 commit comments

Comments
 (0)