Skip to content

Commit b455582

Browse files
committed
defaultValue is always an empty string, value is the correct one
When the component checks whether there is a default filter applied, it fetches the value from defaultValue. This does not work. defaultValue on the input component is empty. The value property however, contains the correct value.
1 parent 1941246 commit b455582

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/filters/Date.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class DateFilter extends Component {
6262

6363
componentDidMount() {
6464
const comparator = this.refs.dateFilterComparator.value;
65-
const dateValue = this.refs.inputDate.defaultValue;
65+
const dateValue = this.refs.inputDate.value;
6666
if (comparator && dateValue) {
6767
this.props.filterHandler({ date: new Date(dateValue), comparator }, Const.FILTER_TYPE.DATE);
6868
}

0 commit comments

Comments
 (0)