Hello everybody.
Just can’t get my code to work.
I have created a dynamic page, put on it 2 buttons and connected everything.
Everything works fine, but just one thing do not wanna get to work —> getCurrentItemIndex()
no matter what i do, the result is ===> 0
Here is the code-snipet for this issue.
import wixData from 'wix-data';
var Item
var ItemIndex
$w.onReady(() => {
$w('#dynamicDataset').onReady(() => {
Item = $w('#dynamicDataset').getCurrentItem();
ItemIndex = $w('#dynamicDataset').getCurrentItemIndex();
console.log(Item)
console.log(ItemIndex)
});
});
What do i wrong, or did i forget something?
- Database-permissions checked (full access).
- Connections checked.