Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

External filter expects lower case field names #523

Closed
r7lemieux opened this issue Jul 1, 2013 · 1 comment
Closed

External filter expects lower case field names #523

r7lemieux opened this issue Jul 1, 2013 · 1 comment

Comments

@r7lemieux
Copy link
Contributor

I am using an external filter widget and passing the name of the fields and criteria into filterText. If the filter text contains upperCases, the fields are not recognized.

The problem appear to be in buildSearchConditions where the columnDisplay is set:
columnDisplay: columnName.replace(/\s+/g, '').toLowerCase(),

Then in evalFilter:
var col = self.fieldMap[condition.columnDisplay];

What is the intend of columnDisplay? Why set the field to lowercase ? Could we just remove columnDisplay and use the field name instead ?

@jonricaurte
Copy link
Contributor

Column display is used for cases where the the column header name is different than the field name and the user searches a column using the header name. The field being set to lower case was to make it so that the user didn't have to worry about upper case letters to search a column. It currently uses both columnDisplay and field name. The reason why it wasn't working, which you noticed is because the field names were also being set to lower case but when we were defining the fieldmap, we were not making the field names lower case which was the error you were seeing. I changed this line self.fieldMap[col.field.split('.')[0]] = col; to be self.fieldMap[col.field.split('.')[0].toLowerCase()] = col; in the latest 2.0.7 branch and now it works. Thanks!

jonricaurte added a commit that referenced this issue Jul 1, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants