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

Dropdown and MultiSelect on expand event #150

Closed
fairking opened this issue Jan 21, 2020 · 6 comments
Closed

Dropdown and MultiSelect on expand event #150

fairking opened this issue Jan 21, 2020 · 6 comments
Assignees
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone

Comments

@fairking
Copy link

fairking commented Jan 21, 2020

I am missing a small feature on the Dropdown and MultiSelect components. I would like to load a list of options when the dropdown is being expanded first time, not on page load.
So I can see if I pass the selected value as `{ id: 123, name: "Bla-bla" } the name is already included so it will be visible without necessity of loading the list.

  1. Currently if value is present but list is not loaded Dropdown shows empty field (even when my name is present in the value object).
  2. Would be nice to have a spinner on the expanded area while items are loaded (not a big deal).
  3. It might be an event on-expand or something. So when that happens I can check if options are loaded. If they're not I can load the list of options.

Please let me know what do you think guys.

@fairking fairking changed the title Dropdown and MultiSelect on expand Dropdown and MultiSelect on expand event Jan 21, 2020
@cagataycivici cagataycivici self-assigned this Jan 21, 2020
@cagataycivici cagataycivici added the Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add label Jan 21, 2020
@cagataycivici cagataycivici added this to the 1.0.2 milestone Jan 21, 2020
@cagataycivici
Copy link
Member

We'll add show and hide events to both of the components.

@fairking
Copy link
Author

Thanks @cagataycivici

@fairking
Copy link
Author

fairking commented Jan 21, 2020

Loading the list on expand I meant loading from the server, so the will be some delay when options are expanded. I think you can just add an event and I will test the functionality and then let you know if there anything else needs to be done. I think this feature will benefit and will be interesting for everyone. Thanks.

@cagataycivici
Copy link
Member

I agree, once you confirm that it works we can later add a loading prop with a loading icon so the users can be notified during loading process.

cagataycivici added a commit that referenced this issue Jan 30, 2020
@cagataycivici
Copy link
Member

There are now;

  • before-show
  • before-hide
  • show
  • hide

@fairking
Copy link
Author

Thanks @cagataycivici I will be in touch as I am going to create such functionality to load dropdown options only when user expands it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Projects
None yet
Development

No branches or pull requests

2 participants