make topic title required

This commit is contained in:
or-else
2018-12-01 11:34:42 +03:00
parent 486cf2e355
commit 4f70de3aa9
2 changed files with 4 additions and 2 deletions
+2 -2
View File
@@ -762,8 +762,8 @@ i.search {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-around; justify-content: space-around;
width: 3rem; width: inherit;
height: 3rem; height: inherit;
} }
.contact-box .text-box { .contact-box .text-box {
display: flex; display: flex;
+2
View File
@@ -216,6 +216,7 @@ class InfoView extends React.Component {
} }
handleFullNameUpdate(fn) { handleFullNameUpdate(fn) {
fn = fn.trim();
if (this.state.fullName !== fn) { if (this.state.fullName !== fn) {
this.setState({fullName: fn}); this.setState({fullName: fn});
this.props.onTopicDescUpdate(this.props.topic, this.props.onTopicDescUpdate(this.props.topic,
@@ -449,6 +450,7 @@ class InfoView extends React.Component {
placeholder={this.state.groupTopic ? "Group name" : <i>Unknown</i>} placeholder={this.state.groupTopic ? "Group name" : <i>Unknown</i>}
readOnly={!this.state.owner} readOnly={!this.state.owner}
value={this.state.fullName} value={this.state.fullName}
required={true}
onFinished={this.handleFullNameUpdate} /></div> onFinished={this.handleFullNameUpdate} /></div>
<div> <div>
<label className="small"> <label className="small">