Hey, I have had problems in the new (text/vector) button for a long time, being unable to to hide, show, collapse, expand, enable and disable.
Setting the button’s ’ collapsed on load ’ properity to true shifts the button to the far left gridline, also disabling the button doesn’t have any “visual” effect, the button looks as if it’s enabled - I’ve reported this bug previously in my “Wishlist App” post - , and now for some reasons, I can’t change any of their properties through the element properties panel or by code.
Here’s an example, setting the buttons labels works just fine:
$w('#articlesDataset').onReady(async () => {
let total = $w('#articlesDataset').getTotalCount();
if (total <= 7) { $w('#goToAllArticles').hide(); }
$w('#articlesDataset').getItems(0, 7).then((result) => {
let items = result.items;
let totalCount = result.totalCount;
for (let i = 0; i < totalCount; i++) {
let label = items[i].title;
let link = items[i]['link-support-articles-title'];
// Set the label and link based on the element Id;
let elementId = `#topArt${String(i+1)}`;
$w(elementId).label = label;
$w(elementId).link = link;
}
})
})
But setting any other property of the buttons failed and had no effects whatsoever.
Here’s the code that it’s not working:
function hideButtons() {
// Hide articles buttons - These are the 7 buttons in the picture above
for (let i = 0; i < 7; i++) {
let topArt = `#topArt${String(i+1)}`;
let knownIssues = `#knownIssues${String(i+1)}`;
let solvedArt = `#solvedArt${String(i+1)}`;
$w(topArt, knownIssues, solvedArt).hide();
}
// These are the buttons that shows "View More"
$w('#goToAllArticles, #toKnownIssues, #goToSolvedIssues').hide();
}
And yes I did try to hide them individually but that didn’t work either.
Please fix these and/or other bugs before rushing to release new features.
This button is so powerful, but it’s buggy as hell. It’d be nice if we can change the vector inside the button, but this is a topic for another day.
Thanks all for reading, hope this issue get fixed soon.
Ahamd