Hey everyone, I'm not really used to JavaScript so this could be a very easy solve to someone experienced but I'm receiving a few errors in my code. I have attached the 2 errors I am getting. I have checked the table names, the dataset names and cannot find any issues. If you need more information then let me know and I'll do my best to provide it. We are using a CMS table so that we can use the database of drivers and drivers standings.
Error: Property 'setFilter' does not exist on type 'Table'.
Error: Property 'view' does not exist on type 'WixDataFilter'.
Code:
import wixData from 'wix-data';
$w.onReady(function () {
// Set initial state when the page is loaded
showOverallStandings();
// Button 1 click event
$w("#button1").onClick(() => {
showOverallStandings();
});
// Button 2 click event
$w("#button2").onClick(() => {
showLeagueDrivers("BUKC");
});
// Button 3 click event
$w("#button3").onClick(() => {
showLeagueDrivers("Non-Competitive");
});
});
// Function to show overall standings
function showOverallStandings() {
// Set the dataset filter to the "Overall" view
$w("#InternalKartingChampionship").setFilter(wixData.filter().view("Overall"));
// Refresh the dataset to apply the filter
$w("#InternalKartingChampionship").refresh();
}
// Function to show drivers in a specific league
function showLeagueDrivers(leagueName) {
// Set the dataset filter to the respective league view
$w("#InternalKartingChampionship").setFilter(wixData.filter().view(leagueName));
// Refresh the dataset to apply the filter
$w("#InternalKartingChampionship").refresh();
}
Ludzie starają się, aby Kasyna online mogą być zarówno dobre jak i złe dla Twojego portfela. Silnie zalecam, abyś odwiedził kasyno online, aby uzyskać najlepsze wrażenia z gry,Jeśli szukałeś najlepszego kasyna, to znak, że je znalazłeś.Nie mogłem uwierzyć, że mogę wygrać pieniądze w Bruce casino kasynie