eherve / mongoose-datatable

Server side dataTable request support for mongoose
MIT License
42 stars 29 forks source link

searchBuilder.js has some bug. #30

Closed taeminlee closed 9 years ago

taeminlee commented 9 years ago

I have used mongoose-datatable very well. However, updated to version 1.0.1 broken my app. Because isSearchFieldRegexp function in searchBuilder.js has code like..

function isSearchFieldRegexp(index) {
  return query[QUERY_COLUMNS][index][QUERY_SEARCH][QUERY_SEARCH_REGEXP_PREFIX] === 'true' ||
    uery[QUERY_COLUMNS][index][QUERY_SEARCH][QUERY_SEARCH_REGEXP_PREFIX] === true;
}

but uery should be query like..

function isSearchFieldRegexp(index) {
  return query[QUERY_COLUMNS][index][QUERY_SEARCH][QUERY_SEARCH_REGEXP_PREFIX] === 'true' ||
    query[QUERY_COLUMNS][index][QUERY_SEARCH][QUERY_SEARCH_REGEXP_PREFIX] === true;
}

Please fix this issue. Thank you.

eherve commented 9 years ago

Hi,

Thanks for using the plugin and thanks for the feedback ! I have updated the code and published the 1.0.2 on npm to fix this issue.

Regards