Seems to be a good idea, but could bring some disatvantages as sideeffect.
@onemoretime
Since you are already a more advanced coder, i would recommend you to evolve your skills even moreā¦
This one you are using directly, yes it is ok (just ok), but for you ā JUST-OK ā shouldnāt be enough!!!
wixData
.query("LOCALI_COMMERCIALI")
.find()
.then((results) => {
if (results.items.length > 0) {
const items = results.items;
$w("#repeater1").data = items;
}
});
Instead your intention should be always to keep the following on your mind..
- I have always to code as most as possible the dynamic way (avoiding hardcodings)
- I should always try to produce reusable code.
- My code should always be as much as possible ā MODULAR (and again reusable)
- I should maybe use ā USER-INTERFACES ā to be able to provide my customers a more simple SETUP-SOLUTIONS!
EDIT:
5) Using more ā RETURNING FUNCTIONS!
Take a look hereā¦
Maybe your answer now will be ā "Oh, i just did not want to spend to much time onto solution ā NOT ACCEPTED !!!
EDIT: ā
Type in ā USER-INTERFACE ā into the search of this forum and you will understandā¦
https://forum.wixstudio.com/search?q=user-interface