diff --git a/frontend/src/metabase/dashboard/containers/ParameterWidget.jsx b/frontend/src/metabase/dashboard/containers/ParameterWidget.jsx index e352c644b130e2fc9c67233e6b8ec30905713116..68378c9a58631ab4ee6c47d0798ed699ce5aa119 100644 --- a/frontend/src/metabase/dashboard/containers/ParameterWidget.jsx +++ b/frontend/src/metabase/dashboard/containers/ParameterWidget.jsx @@ -35,11 +35,13 @@ export default class ParameterWidget extends Component { } static propTypes = { - parameter: PropTypes.object + parameter: PropTypes.object, + commitImmediately: PropTypes.object }; static defaultProps = { parameter: null, + commitImmediately: false } getValues() { @@ -55,7 +57,7 @@ export default class ParameterWidget extends Component { } renderPopover(value, setValue, placeholder, isFullscreen) { - const {parameter, editingParameter} = this.props; + const {parameter, editingParameter, commitImmediately} = this.props; const isEditingParameter = !!(editingParameter && editingParameter.id === parameter.id); const values = this.getValues(); return ( @@ -69,6 +71,7 @@ export default class ParameterWidget extends Component { placeholder={placeholder} focusChanged={this.focusChanged} isFullscreen={isFullscreen} + commitImmediately={commitImmediately} /> ); } diff --git a/frontend/src/metabase/dashboard/containers/Parameters.jsx b/frontend/src/metabase/dashboard/containers/Parameters.jsx index c0d14c887c0ed80efbc85f2352b7f6b9c1cf45c2..23112afd40701a42b3b91b0ad2d70ac139c7e66d 100644 --- a/frontend/src/metabase/dashboard/containers/Parameters.jsx +++ b/frontend/src/metabase/dashboard/containers/Parameters.jsx @@ -11,6 +11,7 @@ export default class Parameters extends Component { defaultProps = { syncQueryString: false, vertical: false, + commitImmediately: false } componentWillMount() { @@ -62,7 +63,8 @@ export default class Parameters extends Component { editingParameter, setEditingParameter, isEditing, isFullscreen, isNightMode, isQB, setParameterName, setParameterValue, setParameterDefaultValue, removeParameter, - vertical + vertical, + commitImmediately } = this.props; const parameters = this._parametersWithValues(); @@ -88,6 +90,8 @@ export default class Parameters extends Component { setValue={(value) => setParameterValue(parameter.id, value)} setDefaultValue={(value) => setParameterDefaultValue(parameter.id, value)} remove={() => removeParameter(parameter.id)} + + commitImmediately={commitImmediately} /> ) } </div> diff --git a/frontend/src/metabase/query_builder/components/NativeQueryEditor.jsx b/frontend/src/metabase/query_builder/components/NativeQueryEditor.jsx index 9c53a89e8aa66c29e8dde0c99f1a3f0f74e1e128..85a2d0fc1d15839245bcafc94fe2d7de9a1192aa 100644 --- a/frontend/src/metabase/query_builder/components/NativeQueryEditor.jsx +++ b/frontend/src/metabase/query_builder/components/NativeQueryEditor.jsx @@ -347,6 +347,7 @@ export default class NativeQueryEditor extends Component { setParameterValue={setParameterValue} syncQueryString isQB + commitImmediately /> <a className="Query-label no-decoration flex-align-right flex align-center px2" onClick={this.toggleEditor}> <span className="mx2">{toggleEditorText}</span>