I’m confused

dropdown does not refresh

Dear Appery

Good evening to you and i'm lost..

i have multiple dropdowns and some of work fine and other is not..
here is an example.



I'm mapping the data to grade_xd (data type is string) and iam_xd (data type is number)



grade_xd works fine with just mapping to "selected" but iam_xd is not

so i have tried to do following
after "complete"

Apperyio("iam_xd").val('3').selectmenu('refresh');
Apperyio("iam_xd").val('3').refresh();

Apperyio("iam_xd").val(3).selectmenu('refresh');
Apperyio("iam_xd").val(3).refresh();

but this is what i see in the inspector



as per, "data-deferred-value="3" " indicates, it can not find the matching value from the dropdown..:(

I looked at https://getsatisfaction.com/apperyio/...

https://getsatisfaction.com/apperyio/...

but does not shade any light at this time.
so any insight would be greatly appreciate it.
thank YOU!!!
1 person has
this problem
+1
Reply
  • Hello,

    Please check if there are any errors in the browser console. You can learn here: https://docs.appery.io/docs/using-bro... how to open the console.

    The code you've provided is fine
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. happy, confident, thankful, excited indifferent, undecided, unconcerned sad, anxious, confused, frustrated kidding, amused, unsure, silly

  • Dear Serhii

    Good afternoon to you and thank YOU for your response & instruction.
    there are no error msgs...:(
    fundamentally.. dropdown with string data is working fine via mapping.
    just wanted to see how data is being handled.. below is what i see on the dropdown with string data..



    both value from database and dropdown values are shown with & #8023; (zero width space) so if i had correct value from database, it works fine.

    however, below is where data type from database is number..



    you will notice the dropdown values contains "& #8023;" but not the value from database..

    so why mapping data to "Selected" does work with string but not number from database?

    just FYI, dropdown value is coming from a localstorage

    [{"id":3,"item":"Father"},{"id":4,"item":"Guardian"},{"id":1,"item":"Member"},{"id":2,"item":"Mother"}]

    and when i post the data.. need to do following; for some reason, object in an array of Localstorage had extra stuff in front and come to think of it, could it be "& #8023;" ??..

    inputdata = Number($this.val().slice(1)); //converting to numb

    Thank YOU!!!
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. happy, confident, thankful, excited indifferent, undecided, unconcerned sad, anxious, confused, frustrated kidding, amused, unsure, silly

  • Could you show the exact mapping you use here and the code, if you use one?
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. happy, confident, thankful, excited indifferent, undecided, unconcerned sad, anxious, confused, frustrated kidding, amused, unsure, silly