fix: add back newestFirst/oldestFirst sorting to published/downloaded pages

This commit is contained in:
Sean Yesmunt 2018-04-04 15:09:06 -04:00
parent 0b4d9d25d5
commit 55fedf1640

View file

@ -44,6 +44,8 @@ class FileList extends React.PureComponent<Props, State> {
sortBy: 'dateNew', sortBy: 'dateNew',
}; };
(this: any).handleSortChanged = this.handleSortChanged.bind(this);
this.sortFunctions = { this.sortFunctions = {
dateNew: fileInfos => dateNew: fileInfos =>
this.props.sortByHeight this.props.sortByHeight
@ -180,7 +182,8 @@ class FileList extends React.PureComponent<Props, State> {
value={sortBy} value={sortBy}
onChange={this.handleSortChanged} onChange={this.handleSortChanged}
> >
<option value="date">{__('Date')}</option> <option value="dateNew">{__('Newest First')}</option>
<option value="dateOld">{__('Oldest First')}</option>
<option value="title">{__('Title')}</option> <option value="title">{__('Title')}</option>
</FormField> </FormField>
)} )}