1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-10 19:29:56 +00:00

[select-editor, link details] fixup: display the current option rightly for the 'select-editor'; removed ':' after 'Permission' for 'link details' (#6465)

This commit is contained in:
llj
2024-08-01 20:47:46 +08:00
committed by GitHub
parent ac82753546
commit 53c85d9366
3 changed files with 8 additions and 5 deletions

View File

@@ -107,8 +107,6 @@ class SelectEditor extends React.Component {
render() {
let { currentOption, isTextMode } = this.props;
// scence1: isTextMode (text)editor-icon --> select
// scence2: !isTextMode select
return (
<div className="permission-editor" onClick={this.onSelectHandler}>
{(!isTextMode || this.state.isEditing) &&
@@ -116,8 +114,7 @@ class SelectEditor extends React.Component {
options={this.state.options}
className="permission-editor-select"
classNamePrefix="permission-editor"
placeholder={this.props.translateOption(currentOption)}
value={currentOption}
value={this.state.options.filter(item => item.value == currentOption)[0]}
onChange={this.onOptionChanged}
captureMenuScroll={false}
menuPlacement="auto"