@hipay/hipay-material-ui 1.0.0-beta.3 → 1.0.0-beta.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -131,21 +131,19 @@ var HiDatePicker = function (_React$Component) {
131
131
  }, {
132
132
  key: 'handleDayChange',
133
133
  value: function handleDayChange(day, modifiers) {
134
- if (this.props.onChange) {
135
- if (modifiers.selected) {
136
- // Deselect day
137
- this.props.onChange(undefined);
138
- } else {
139
- // Keep Time if set
140
- if (this.props.enableTime && day !== undefined) {
141
- if (this.props.value) {
142
- day.setHours(this.props.value.getHours(), this.props.value.getMinutes());
143
- } else {
144
- day.setHours(0, 0);
145
- }
134
+ if (modifiers.selected) {
135
+ // Deselect day
136
+ this.props.onChange(undefined);
137
+ } else {
138
+ // Keep Time if set
139
+ if (this.props.enableTime && day !== undefined) {
140
+ if (this.props.value) {
141
+ day.setHours(this.props.value.getHours(), this.props.value.getMinutes());
142
+ } else {
143
+ day.setHours(0, 0);
146
144
  }
147
- this.props.onChange(day);
148
145
  }
146
+ this.props.onChange(day);
149
147
  }
150
148
  if (day instanceof Date && !this.props.enableTime && modifiers.selected !== true) {
151
149
  // Hide overlay & remove focus on input
@@ -400,7 +398,7 @@ HiDatePicker.propTypes = process.env.NODE_ENV !== "production" ? {
400
398
  *
401
399
  * @param {Date} date sélectionnée
402
400
  */
403
- onChange: _propTypes2.default.func,
401
+ onChange: _propTypes2.default.func.isRequired,
404
402
  /**
405
403
  * Callback au reset de l'input
406
404
  */
@@ -163,10 +163,13 @@ var HiFormControl = function (_React$PureComponent) {
163
163
 
164
164
  (0, _createClass3.default)(HiFormControl, [{
165
165
  key: 'handleHelperClick',
166
- value: function handleHelperClick() {
166
+ value: function handleHelperClick(event) {
167
167
  this.setState(function (prevState) {
168
168
  return { helperOpen: !prevState.helperOpen };
169
169
  });
170
+ if (event) {
171
+ event.preventDefault();
172
+ }
170
173
  }
171
174
  }, {
172
175
  key: 'handleFocus',
package/HiForm/HiInput.js CHANGED
@@ -124,7 +124,7 @@ var styles = exports.styles = function styles(theme) {
124
124
  rightIcon: {
125
125
  margin: '0 8px',
126
126
  width: 18,
127
- height: 40,
127
+ height: 39,
128
128
  color: theme.palette.neutral.normal
129
129
  },
130
130
  rightIconFocus: {
@@ -147,10 +147,10 @@ var styles = exports.styles = function styles(theme) {
147
147
  padding: 0
148
148
  }),
149
149
  inputText: {
150
- height: 40
150
+ height: 39
151
151
  },
152
152
  inputTextarea: {
153
- minHeight: 40,
153
+ minHeight: 39,
154
154
  paddingTop: 8
155
155
  },
156
156
  iconPointer: {
@@ -158,7 +158,7 @@ var styles = exports.styles = function styles(theme) {
158
158
  cursor: 'pointer'
159
159
  },
160
160
  eraseButton: {
161
- height: 40,
161
+ height: 39,
162
162
  width: 40,
163
163
  display: 'inline-block'
164
164
  },
@@ -124,7 +124,7 @@ var HiSearchField = function (_React$Component) {
124
124
 
125
125
  this.props.callbackFilteredList(filteredList);
126
126
  } else {
127
- this.props.onSearch(searchedValue);
127
+ this.props.onSearch(event, searchedValue);
128
128
  }
129
129
  }
130
130
  }, {