I have been trying out using the DevMode on Wix to format my content manager (all) page so that I can have tags associated with the events I am posting. I have managed to get the tags to work but in doing so I can no longer use the filter/sort option in the dataset settings to get the events to display in chronological order.
Please can someone take a look at my code and tell me what I can try to amend this issue?
Thanks in advanced!
Current code i’m using which allows me to use the tags:
import wixData from ‘wix-data’ ;
const collectionName = ‘Courses’ ;
const fieldToFilterByInCollection = ‘section’ ;
$w.onReady( function () {
setRepeatedItemsInRepeater();
loadDataToRepeater();
$w( '#tags' ).onChange((event) => {
const selectedTags = $w( ‘#tags’ ).value;
loadDataToRepeater(selectedTags);
})
});
function loadDataToRepeater(selectedCategories = ) {
let dataQuery = wixData.query(collectionName);
if (selectedCategories.length > 0 ) {
dataQuery = dataQuery.hasAll(fieldToFilterByInCollection, selectedCategories);
}
dataQuery
.find()
.then(results => {
const itemsReadyForRepeater = results.items;
$w( ‘#repeater1’ ).data = itemsReadyForRepeater;
const isRepeaterEmpty = itemsReadyForRepeater.length === 0
if (isRepeaterEmpty) {
$w( ‘#noResultsFound’ ).show();
} else {
$w( ‘#noResultsFound’ ).hide();
}
})
}
function setRepeatedItemsInRepeater() {
$w( '#repeater1' ).onItemReady(($item, itemData) => {
$item( '#text6' ).text =itemData.title;
$item( '#text6' ).src = itemData.image;
$item( '#image1' ).tooltip = itemData.title;
$item( '#text2' ).text = '$' + itemData.productPrice;
$item( '#button2' ).text =itemData.tags;
})

