mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-05 08:53:14 +00:00
Change select style (#5645)
* 01 change css file path * 02 change Select style
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
import React, { Fragment } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { Button } from 'reactstrap';
|
||||
import Select from 'react-select';
|
||||
import { gettext, isPro, enableShareToDepartment } from '../../utils/constants';
|
||||
import { seafileAPI } from '../../utils/seafile-api';
|
||||
import { Utils } from '../../utils/utils';
|
||||
import toaster from '../toast';
|
||||
import SharePermissionEditor from '../select-editor/share-permission-editor';
|
||||
import { SeahubSelect, NoGroupMessage } from '../common/select';
|
||||
|
||||
class GroupItem extends React.Component {
|
||||
|
||||
@@ -117,16 +117,6 @@ const propTypes = {
|
||||
onAddCustomPermissionToggle: PropTypes.func,
|
||||
};
|
||||
|
||||
const NoOptionsMessage = (props) => {
|
||||
return (
|
||||
<div {...props.innerProps} style={{margin: '6px 10px', textAlign: 'center', color: 'hsl(0,0%,50%)'}}>{gettext('Group not found')}</div>
|
||||
);
|
||||
};
|
||||
|
||||
NoOptionsMessage.propTypes = {
|
||||
innerProps: PropTypes.object.isRequired,
|
||||
};
|
||||
|
||||
class ShareToGroup extends React.Component {
|
||||
|
||||
constructor(props) {
|
||||
@@ -340,15 +330,13 @@ class ShareToGroup extends React.Component {
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<Select
|
||||
isMulti
|
||||
<SeahubSelect
|
||||
onChange={this.handleSelectChange}
|
||||
options={this.state.options}
|
||||
placeholder={gettext('Select groups...')}
|
||||
maxMenuHeight={200}
|
||||
inputId={'react-select-2-input'}
|
||||
value={this.state.selectedOption}
|
||||
components={{ NoOptionsMessage }}
|
||||
components={{ NoOptionsMessage: NoGroupMessage }}
|
||||
/>
|
||||
</td>
|
||||
<td>
|
||||
|
Reference in New Issue
Block a user