react-ui-basics 0.0.205 → 0.0.207

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-ui-basics",
3
- "version": "0.0.205",
3
+ "version": "0.0.207",
4
4
  "description": "",
5
5
  "module": "index.js",
6
6
  "_main": "index.cjs.js",
@@ -389,13 +389,14 @@ class AutocompleteSelect extends PureComponent {
389
389
  }
390
390
 
391
391
  onClickOutside = () => {
392
- const {allowCustom, required} = __props(this);
392
+ const {allowCustom, required, onFilterInputChange} = __props(this);
393
393
  const {filterValue} = __state(this);
394
394
  if (allowCustom && (!!filterValue || !required)) {
395
395
  this.onSelect()
396
396
  }
397
397
 
398
- this.setState({isActive: false});
398
+ this.setState({isActive: false, filterValue: ''});
399
+ onFilterInputChange && onFilterInputChange('');
399
400
 
400
401
  this.onCancel();
401
402
  };
@@ -3,7 +3,7 @@ import ReactDOM from "react-dom";
3
3
  import './DatePicker.css'
4
4
  import TextField from "./TextField";
5
5
  import * as DateTools from "./DateTools";
6
- import {orNoop, classNames, preventDefault, ref, WINDOW} from "./Tools";
6
+ import {orNoop, classNames, preventDefault, ref, WINDOW, stopPropagation} from "./Tools";
7
7
  import Button from './Button'
8
8
  import CalendarMonthView from "./CalendarMonthView";
9
9
  import MaterialIcon from "./MaterialIcon";
@@ -183,12 +183,14 @@ class DatePicker extends React.Component<DatePickerProps, DatePickerState> {
183
183
  {monthToString(selectedMonth.get(DateTools.TimeUnit.MONTH))}
184
184
  &nbsp;{selectedMonth.get(DateTools.TimeUnit.YEAR)}
185
185
  </span>
186
- <Button flat={true} round={true} disabled={minDate && DateTools.dateOf(selectedMonth).isBefore(minDate)} onClick={() => {
186
+ <Button flat={true} round={true} disabled={minDate && DateTools.dateOf(selectedMonth).isBefore(minDate)} onClick={(e) => {
187
+ stopPropagation(e)
187
188
  this.setState({selectedMonth: DateTools.dateOf(selectedMonth).subtract(1, DateTools.TimeUnit.MONTH)})
188
189
  }}>
189
190
  <MaterialIcon icon={'chevron_left'}/>
190
191
  </Button>
191
- <Button flat={true} round={true} onClick={() => {
192
+ <Button flat={true} round={true} onClick={(e) => {
193
+ stopPropagation(e)
192
194
  this.setState({selectedMonth: DateTools.dateOf(selectedMonth).add(1, DateTools.TimeUnit.MONTH)})
193
195
  }}>
194
196
  <MaterialIcon icon={'chevron_right'}/>