Last active
February 28, 2022 12:41
-
-
Save alexiglesias93/c6b9348c3e7e3450e66b6e3d00d77edf to your computer and use it in GitHub Desktop.
`cmsfilter` API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Listening for `renderitems` events on a `cmsfilter` setup. | |
*/ | |
window.fsAttributes = window.fsAttributes || []; | |
window.fsAttributes.push([ | |
'cmsfilter', | |
(filterInstances) => { | |
console.log('cmsfilter Successfully loaded!'); | |
console.log(filterInstances); | |
const [filterInstance] = filterInstances; | |
console.log(filterInstance); | |
console.log(filterInstance.filtersData); | |
// The `renderitems` event runs whenever the list renders items after filtering. | |
filterInstance.listInstance.on('renderitems', (renderedItems) => { | |
console.log(renderedItems); | |
}); | |
}, | |
]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment