File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed
DTableFiltersPopover/widgets Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -215,19 +215,17 @@ class FilterItem extends React.Component {
215215 } ;
216216
217217 onFilterTermCheckboxChanged = ( ) => {
218- const { filterColumn } = this . props ;
219- const value = this . checkboxEditor . getValue ( ) ;
220- const checked = value [ filterColumn . key ] ;
221- this . onFilterTermChanged ( checked ) ;
218+ const value = this . checkboxEditor ?. getValue ( ) ;
219+ this . onFilterTermChanged ( ! ! value ) ;
222220 } ;
223221
224222 onFilterTermTextChanged = ( value ) => {
225223 this . onFilterTermChanged ( value ) ;
226224 } ;
227225
228226 onFilterTermNumberChanged = ( ) => {
229- const value = this . numberEditor . getValue ( ) ;
230- this . onFilterTermChanged ( Object . values ( value ) [ 0 ] ) ;
227+ const value = this . numberEditor ? .getValue ( ) ;
228+ this . onFilterTermChanged ( value ) ;
231229 } ;
232230
233231 onFilterTermDurationChanged = ( ) => {
@@ -278,7 +276,7 @@ class FilterItem extends React.Component {
278276 column = { filterColumn }
279277 value = { filterTerm }
280278 className = 'dtable-ui-filter-item-checkbox'
281- onChange = { this . onFilterTermCheckboxChanged }
279+ onCommit = { this . onFilterTermCheckboxChanged }
282280 readOnly = { readOnly }
283281 />
284282 </ div >
Original file line number Diff line number Diff line change @@ -59,7 +59,11 @@ class NumberEditor extends React.Component {
5959 } ;
6060
6161 onBlur = ( ) => {
62- this . props . isInModal ? this . props . onCommit ( this . getValue ( ) ) : this . props . onBlur ( ) ;
62+ if ( this . props . onCommit ) {
63+ this . props . onCommit ( this . getValue ( ) ) ;
64+ } else if ( this . props . onBlur ) {
65+ this . props . onBlur ( ) ;
66+ }
6367 } ;
6468
6569 setInputRef = ( input ) => {
You can’t perform that action at this time.
0 commit comments