You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
searchFieldDrop's index might be null if searching for a field that is not part of the grid (which in our application is a common usecase, to filter based on database fields that are not displayed in the grid).
In that case, this.getSearch(sd.field, true) returns null and as a result, the HTML of the search action contains searchFieldDrop|null|0|this.
If you now click on such a search action, the following error will be raised:
w2ui.js:4291 Uncaught TypeError: Cannot read properties of undefined (reading 'type')
at w2grid.searchFieldDrop (w2ui.js:4291)
at HTMLSpanElement.<anonymous> (w2ui.js:1943)
at HTMLSpanElement.dispatch (jquery-3.6.0.js:5430)
at HTMLSpanElement.elemData.handle (jquery-3.6.0.js:5234)
Using sd_ind (and searchData) in such a case will probably not work, because the search data is unlikely to contain a type property.
Maybe text should be assumed as fallback type in such a case? And searchData[sd_ind].field / searchData[sd_ind].operator could be used as fallback for sf.field / sf.operators.
The text was updated successfully, but these errors were encountered:
searchFieldDrop's index might be null if searching for a field that is not part of the grid (which in our application is a common usecase, to filter based on database fields that are not displayed in the grid).
In that case,
this.getSearch(sd.field, true)
returnsnull
and as a result, the HTML of the search action containssearchFieldDrop|null|0|this
.If you now click on such a search action, the following error will be raised:
Using
sd_ind
(andsearchData
) in such a case will probably not work, because the search data is unlikely to contain atype
property.Maybe
text
should be assumed as fallback type in such a case? AndsearchData[sd_ind].field
/searchData[sd_ind].operator
could be used as fallback forsf.field
/sf.operators
.The text was updated successfully, but these errors were encountered: