Page Variable bind to Input and Slider Component. Slider updates input field not correctly

Hi,

I have a Input Field and a Slider which is bind to same page variable.

image

When I change the value in the input field, the slider gets updated.
When I changed the slider the input field is getting erased and it is displayed empty.

Any ideas, if I do something wrong?

Hi!

Sorry for taking so long to respond!

You’re not doing anything wrong, as a default the value gets updated when you let go of the slider. However, if you’d like real-time update, I would do the following in the logic canvas of the slider:

So add a set page variable flow function after the slider’s Component onChange, and set the assigned value as Received event. Now every time the slider value changes, the variable you have bound to it should change at the same time.

hi @Cecilia ,

I tried it, but still not working:

image

The alert gives the correct value, but in the input field is not filled correctly (it is set to empty)

Any more ideas - is it maybe a bug?? Or an issue with data types: “number” vs. “text”?

Hmm! So in that Set page variable node, you have set Assigned value as Output value of another node - Receive event? I just tried this and it worked.

However it might be due to the data types as you suggested. If the variable is a text type, you can try assigning the Output value of another node via a formula that first converts it into text, like this: STRING(outputs["Receive event"].eventValue)

the page var is type of number. I thought maybe the input field can only work with text. But thats wrong.

I tried it with STRING-function, but also did not helped. May you be so kind and have a look at it directly:
…176394/pages/8 ?

Hi!

I found a way for this with the input field. Bind the input field’s placeholder text property as STRING(the_variable) and then it updates correctly. To modify its styling so it doesn’t look like dimmed placeholder text, you can double click the input field to enter isolation mode, and then modify the styling of the text input, more precisely the inactive color under typography.

1 Like

@Cecilia , nice workaround - thanks! that helped!

btw: when you set the number page variable as placeholder the complete appgyver app crashes :wink:

1 Like

Great that it helped! Thanks for reporting these issues, I’ll take a closer look and file bug reports about them.