Skip to content

Commit

Permalink
Address Comments
Browse files Browse the repository at this point in the history
  • Loading branch information
nikolagigic committed Jan 18, 2021
1 parent 3ccae72 commit cca9364
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions superset-frontend/src/explore/components/SaveModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import { connect } from 'react-redux';

// Session storage key for recent dashboard
const SK_DASHBOARD_ID = 'save_chart_recent_dashboard';
const SELECT_PLACEHOLDER = t('Select dashboard');
const SELECT_PLACEHOLDER = t('**Select** a dashboard OR **create** a new one');

type SaveModalProps = {
can_overwrite?: boolean;
Expand Down Expand Up @@ -153,7 +153,10 @@ class SaveModal extends React.Component<SaveModalProps, SaveModalState> {

render() {
const dashboardSelectValue =
this.state.newDashboardName || this.state.saveToDashboardId;
this.state.saveToDashboardId || this.state.newDashboardName;
const valueObj = dashboardSelectValue
? { value: dashboardSelectValue }
: null;
return (
<Modal
show
Expand Down Expand Up @@ -244,14 +247,13 @@ class SaveModal extends React.Component<SaveModalProps, SaveModalState> {
<CreatableSelect
id="dashboard-creatable-select"
className="save-modal-selector"
menuPosition="fixed"
options={this.props.dashboards}
clearable
creatable
onChange={this.onDashboardSelectChange}
autoSize={false}
value={
dashboardSelectValue ? { value: dashboardSelectValue } : null
}
value={valueObj}
placeholder={
// Using markdown to allow for good i18n
<ReactMarkdown
Expand Down

0 comments on commit cca9364

Please sign in to comment.