-
-
Notifications
You must be signed in to change notification settings - Fork 120
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
Odata Query encoding #463
Comments
Sorry but I don't really want to do any changes for this, if I encode the value then the users (you) will have to decode it. I don't think this is ideal and I think you should encode/decode yourself. |
Umm.. Sorry if I was unable to make myself clear, but the issue is it encodes the string if I only select male I have no problem in decoding/encoding but the oData query produced is not consistent. Hope you are understanding my problem. |
Hmm ok I see, can you try to troubleshoot the problem and fix it? I'd be happy to have help on this since we don't use OData anymore. By looking at the code, I see that I dealt with single search by escaping single quote and encoding on this line but I don't remember how it's dealing with multiple search values. The project is already setup with debugging, if you could just clone and contribute to a fix that would be really great. Thanks I wish you had find your issue before I release a new version though (first in 2 months). Oh well.. |
I can see the issue is on this line. |
No I don't think so, that line is only to check if there's an Operator that was typed in the filter. It's most probably around this line but like I said earlier, I wish that you troubleshoot with your use case then contribute by providing a Pull Request. Thanks |
Sorry I tagged the wrong line. Angular-Slickgrid/src/app/modules/angular-slickgrid/services/grid-odata.service.ts Line 263 in 7535f49
|
Co-authored-by: Ghislain Beaulac <[email protected]>
This is now fixed in latest version 2.18.x. I'd be happy to have more help next time around, thanks. Please upvote ⭐ if you haven't already. |
I'm submitting a Bug report
Your Environment
Describe the Bug
Hi Author,
Thanks for making such a great library :). I am reporting this issue for backendservice oData query
So the current behaviour is that when a multiselect value contains a value having special symbol(/, @, #, etc.) it encodes the string and then oData query is built.
This works properly when a single value is selected but when user selects multiple values encoding does not work properly. I replicated the issue in your code too.
https://github.com/ghiscoding/Angular-Slickgrid/blob/master/src/app/examples/grid-odata.component.ts
Also, note that single quotes and double quotes are not encoded if present in the value
Steps to Reproduce
Expected Behavior
Current Behavior
Possible Solution
Code Sample
{ id: 'gender', name: 'Gender', field: 'gender', filterable: true, filter: { model: Filters.multipleSelect, collection: [{ value: '', label: '' }, { value: 'ma/le"', label: 'male' }, { value: 'female', label: 'female' }] } }
The text was updated successfully, but these errors were encountered: