mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-20 19:08:21 +00:00
[misc] modification for mobile (#4016)
This commit is contained in:
@@ -15,12 +15,12 @@ class SortOptions extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.sortOptions = [
|
||||
{id: 'sort-option-1', value: 'name-asc', text: gettext('By name ascending')},
|
||||
{id: 'sort-option-2', value: 'name-desc', text: gettext('By name descending')},
|
||||
{id: 'sort-option-3', value: 'size-asc', text: gettext('By size ascending')},
|
||||
{id: 'sort-option-4', value: 'size-desc', text: gettext('By size descending')},
|
||||
{id: 'sort-option-5', value: 'time-asc', text: gettext('By time ascending')},
|
||||
{id: 'sort-option-6', value: 'time-desc', text: gettext('By time descending')}
|
||||
{value: 'name-asc', text: gettext('By name ascending')},
|
||||
{value: 'name-desc', text: gettext('By name descending')},
|
||||
{value: 'size-asc', text: gettext('By size ascending')},
|
||||
{value: 'size-desc', text: gettext('By size descending')},
|
||||
{value: 'time-asc', text: gettext('By time ascending')},
|
||||
{value: 'time-desc', text: gettext('By time descending')}
|
||||
];
|
||||
const { sortBy, sortOrder } = this.props;
|
||||
this.state = {
|
||||
@@ -49,8 +49,8 @@ class SortOptions extends React.Component {
|
||||
{this.sortOptions.map((item, index) => {
|
||||
return (
|
||||
<Fragment key={index}>
|
||||
<input id={item.id} className="align-middle" type="radio" name="sort-options" value={item.value} checked={this.state.currentOption == item.value} onChange={this.switchOption} />
|
||||
<label htmlFor={item.id} className="align-middle m-2">{item.text}</label><br />
|
||||
<input id={`option-${index}`} className="align-middle" type="radio" name="sort-option" value={item.value} checked={this.state.currentOption == item.value} onChange={this.switchOption} />
|
||||
<label htmlFor={`option-${index}`} className="align-middle m-2">{item.text}</label><br />
|
||||
</Fragment>
|
||||
);
|
||||
})}
|
||||
|
Reference in New Issue
Block a user