Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ion-Select not selected after API Call #15716

Closed
abhilashbr92 opened this issue Sep 22, 2018 · 6 comments

Comments

4 participants
@abhilashbr92
Copy link

commented Sep 22, 2018

Bug Report

Describe the Bug
I have a select box which display usernames. The list of usernames is got from a API call.

I have a Form Control which is assigned to the select box.

I have value in the form control but the item is displayed in the select box.

I have made a demo in stackblitz below.

https://stackblitz.com/edit/github-igwscn-8kylvc?file=src%2Fapp%2Fapp.component.ts

Steps to Reproduce
Steps to reproduce the behavior:

  1. In app.component.ts there is a variable called delay which has value 3000.Now you see the select box has not selected any value
  2. Change delay value to 0 and save.Now you see the select box has value selected.

Expected Behavior
With delay value 3000, after the username list is returned the name should be displayed in the box.
The issue doesn't exist if I use v3 ion-select or HTML5 select. It is occuring after updating app to v4.

@ionitron-bot ionitron-bot bot added the triage label Sep 22, 2018

@vlapo

This comment has been minimized.

Copy link

commented Sep 22, 2018

Have a same issue. It looks like this.text property is not updated properly after selected option is loaded.
https://github.com/ionic-team/ionic/blob/master/core/src/components/select/select.tsx#L189

@abhilashbr92

This comment has been minimized.

Copy link
Author

commented Nov 16, 2018

Hello Ionic team, any update on this. When can we expect the issue to be fixed?

@abhilashbr92

This comment has been minimized.

Copy link
Author

commented Nov 26, 2018

@vlapo Have you found any alternative about this issue?

@vlapo

This comment has been minimized.

Copy link

commented Nov 26, 2018

Not at all. I think it is simple problem with render selected text after load options. But it has to be fixed in stencil component and I do not have experience with it.

@liamdebeasi

This comment has been minimized.

Copy link
Member

commented Mar 26, 2019

Hi there,

This issue has been resolved and will be available in the next release of Ionic. I have pushed a nightly build in case you would like to try it out and provide feedback. (npm i @ionic/core@dev @ionic/angular@dev)

Thanks for your patience as we worked to resolve this issue!

@ionitron-bot

This comment has been minimized.

Copy link

commented Apr 25, 2019

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Apr 25, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.