Skip to content

feat(RemoveColumnDialog): Remove default value and add placeholder #969

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

Merged
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
6 changes: 4 additions & 2 deletions src/dashboard/Data/Browser/RemoveColumnDialog.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ import Option from 'components/Dropdown/Option.react';
import React from 'react';

export default class RemoveColumnDialog extends React.Component {
constructor(props) {
constructor() {
super();
this.state = {
name: props.currentColumns[0]
name: null
};
}

Expand All @@ -34,6 +34,7 @@ export default class RemoveColumnDialog extends React.Component {
}
input={
<Dropdown
placeHolder='Select a column'
value={this.state.name}
onChange={(name) => this.setState({ name: name })}>
{this.props.currentColumns.map((t) => <Option key={t} value={t}>{t}</Option>)}
Expand All @@ -50,6 +51,7 @@ export default class RemoveColumnDialog extends React.Component {
confirmText='Remove column'
cancelText={'Never mind, don\u2019t.'}
onCancel={this.props.onCancel}
disabled={!this.state.name}
onConfirm={() => {
this.props.onConfirm(this.state.name);
}}
Expand Down