Skip to content

Remove extra row from Collaborator modal #665

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: production2
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -127,15 +127,17 @@ export default class PermissionsCollaboratorDialog extends React.Component {
for (const feature in this.props.defaultFeaturesPermissions) {
const text = this.state.features.label[index]
const description = this.state.features.description[index]
const collaboratorsCanWrite = this.state.features.collaboratorsCanWrite[index]
const label = <Label key={text + (isDefaultFeatures ? 'Label' : 'Input')} text={text} description={description} />
let content = null;
if (isDefaultFeatures) {content = renderSimpleLabels(this.props.defaultFeaturesPermissions[feature]);}
else {content = renderSimpleCheckboxes(feature, this.state.customFeaturesPermissions, collaboratorsCanWrite, this.setPermissions.bind(this));}
rows.push((<div key={feature + (isDefaultFeatures ? 'Label' : 'Input')}>
<Field labelWidth={50} className={styles.label} label={label} input={content} />
{/* <Field labelWidth={100} className={[styles.label, styles.permission].join(' ')} label={content} /> */}
</div>))
if (text && description) {
const collaboratorsCanWrite = this.state.features.collaboratorsCanWrite[index]
const label = <Label key={text + (isDefaultFeatures ? 'Label' : 'Input')} text={text} description={description} />
let content = null;
if (isDefaultFeatures) {content = renderSimpleLabels(this.props.defaultFeaturesPermissions[feature]);}
else {content = renderSimpleCheckboxes(feature, this.state.customFeaturesPermissions, collaboratorsCanWrite, this.setPermissions.bind(this));}
rows.push((<div key={feature + (isDefaultFeatures ? 'Label' : 'Input')}>
<Field labelWidth={50} className={styles.label} label={label} input={content} />
{/* <Field labelWidth={100} className={[styles.label, styles.permission].join(' ')} label={content} /> */}
</div>))
}
index++
}
return rows;
Expand All @@ -157,7 +159,7 @@ export default class PermissionsCollaboratorDialog extends React.Component {
}

renderRows (isFeaturesSelected) {
const selectedTab = isFeaturesSelected ? this.state.selectedFeaturesTab : this.state.selectedClassesTab
const selectedTab = isFeaturesSelected ? this.state.selectedFeaturesTab : this.state.selectedClassesTab;
switch (selectedTab) {
case 'Default':
return this.renderFeaturesRows(true)
Expand Down
Loading