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

CVL 1.4.1 regression :: filtering with list does not work anymore #1397

Open
Captain-Oski opened this issue Sep 11, 2019 · 1 comment
Open

Comments

@Captain-Oski
Copy link

What is happening :

Filtering viz by passing a filter: $cartodb_id in list([1,2,3,4,5]) send an error as follow :

image

this.viz_highlight.filter.blendTo(s.in(s.prop('id'), s.list(ids)));
equivalent to :
filter: $cartodb_id in list([1,2,3,4,5])
or
filter: $cartodb_id in list[1,2,3,4,5]

How to reproduce :

Just change the CVL version from 1.0.0 to 1.4.1 in the CDN of the example below:

https://jsfiddle.net/captainOski/g72weh0y/1/

Thank you for the good work !

@AdriSolid
Copy link

AdriSolid commented Oct 14, 2019

Just got same error, for the moment I'm dynamically creating an 'or' concatenation for each value, something like:

const floorsString = `and (${floors.includes('0') && `$floor == 0 or` || ''} ${floors.includes('1') && ` $floor == 1 or` || ''} ${floors.includes('2') && ` $floor == 2 or` || ''}`;
setFloorsFilter(`${floorsString.substr(0, floorsString.lastIndexOf('or'))})`);

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