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
{{ message }}
This repository has been archived by the owner on Oct 30, 2024. It is now read-only.
Struggling to figure out a solution to filtering by numeric values of one attribute on each item in a list that is rendered dynamically from CMS? For example, I want to filter out all entities with a "cost" field that equals greater than $100.
I have seen several previous issue posts (e.g. #473), but they all seem to solve the problem by adding a custom data attribute (e.g. data-cost) to each of the targets in a static content scenario. But this seems to be a solution primarily for static content (where adding the custom attribute would be possible), yet I haven't been able to figure this out when the targets are coming from a CMS. Any help you could provide for this type of scenario?
function filterTestResult(testResult, target) {
var size = Number(target.dom.el.getAttribute('data-size')); // <<-- HOW DO I DO THIS FOR ITEM FROM CMS TARGET???
var range = getRange();
if (size < range.min || size > range.max) {
testResult = false;
}
return testResult;
}
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Struggling to figure out a solution to filtering by numeric values of one attribute on each item in a list that is rendered dynamically from CMS? For example, I want to filter out all entities with a "cost" field that equals greater than $100.
I have seen several previous issue posts (e.g. #473), but they all seem to solve the problem by adding a custom data attribute (e.g. data-cost) to each of the targets in a static content scenario. But this seems to be a solution primarily for static content (where adding the custom attribute would be possible), yet I haven't been able to figure this out when the targets are coming from a CMS. Any help you could provide for this type of scenario?
function filterTestResult(testResult, target) {
var size = Number(target.dom.el.getAttribute('data-size')); // <<-- HOW DO I DO THIS FOR ITEM FROM CMS TARGET???
var range = getRange();
if (size < range.min || size > range.max) {
testResult = false;
}
return testResult;
}
The text was updated successfully, but these errors were encountered: