Change label within grid cell on click
Hi Illya, response below. Thanks, Ante
Catch up wih the Appery.io community on our forum. Here you'll find information on the lastest questions and issues Appery.io developers are discussing.
https://forum.appery.io/
Hi Illya, response below. Thanks, Ante
Hello,
Please try to debug http://devcenter.appery.io/documentat...
Are there any error in console?
Hi Alena, there is no error in console
1) Ihor suggested global variable flag_checked, that can be used to set a state of your components - visible or not
2) Open console
3) Click the component
Hi Alena, yes did all that. When I click the component nothing shows in the console, its simply blank.
If i just use:
Apperyio("good_count_label").hide();
Apperyio("good_amount_label").show();
Apperyio("textGood").hide();
Apperyio("textRaised").show();
This works on single click of the component.
but as soon as I add:
var flag_checked;
if (flag_checked){
Apperyio("good_count_label").hide();
Apperyio("good_amount_label").show();
Apperyio("textGood").hide();
Apperyio("textRaised").show();
flag_checked = true;
}else{
Apperyio("good_count_label").show();
Apperyio("good_amount_label").hide();
Apperyio("textGood").show();
Apperyio("textRaised").hide();
flag_checked = false;
}
Then the click component no longer works and no error shows in the console ![]()
Thanks for help, Ante.
Yes, this is correct, behavior, because you still haven't placed flag_checked to the global scope.
This variable will always have only false value, therefore only one part will work.
You want to toggle your elements am I right?
Add a toggle component and on value change add this code with one change - instead of flag_checked set toggle value check, on or off.
thanks ![]()