Skip to content
This repository has been archived by the owner on Dec 13, 2020. It is now read-only.

Commit

Permalink
Allow empty value in RawWidget #1383
Browse files Browse the repository at this point in the history
  • Loading branch information
wiadev committed Dec 5, 2017
1 parent da85fd9 commit 1ce0123
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions src/components/widget/RawWidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,8 @@ class RawWidget extends Component {
!isEdited
),
[`text-xs-${gridAlign}`]: gridAlign,
[`input-${(type === 'primary' || forcedPrimary) ? 'primary' : 'secondary'}`]: true,
[`input-${(type === 'primary' || forcedPrimary) ?
'primary' : 'secondary'}`]: true,
[`pulse-${updated ? 'on' : 'off'}`]: true,
'input-table': rowId && !isModal
});
Expand All @@ -171,18 +172,13 @@ class RawWidget extends Component {
onHide, handleBackdropLock, subentity, subentityId, tabIndex,
dropdownOpenCallback, autoFocus, fullScreen, widgetType, fields,
windowType, dataId, type, widgetData, rowId, tabId, icon, gridAlign,
entity, onShow, disabled, caption, viewId, data, listenOnKeys,
listenOnKeysFalse, closeTableField, handleZoomInto, attribute,
allowShowPassword, onBlurWidget
entity, onShow, disabled, caption, viewId, data : widgetValue,
listenOnKeys, listenOnKeysFalse, closeTableField, handleZoomInto,
attribute, allowShowPassword, onBlurWidget
} = this.props;

const {isEdited} = this.state;

// check if it's value from MasterWidget or not
// (to stabilize parsing changes in masterWidget due to problems with
// jumping cursor
const widgetValue = data ? data : widgetData[0].value;

// TODO: API SHOULD RETURN THE SAME PROPERTIES FOR FILTERS
const widgetField = filterWidget ?
fields[0].parameterName : fields[0].field;
Expand Down

0 comments on commit 1ce0123

Please sign in to comment.