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

fix: add loading message when loading template in create pipeline form #583

Merged
merged 3 commits into from
Aug 14, 2020

Conversation

adong
Copy link
Contributor

@adong adong commented Aug 13, 2020

Context

Add message Loading... while loading templates during create pipeline page

Objective

I think there are 2 ways of doing it:

  1. Using noMatchesMessage
          {{#power-select
            options=templates
            selected=selectedTemplate
            onchange=(action "selectTemplate")
            searchField="name"
            searchEnabled=true
            noMatchesMessage="Loading..."
            as |template| }}
            {{template.name}}
          {{/power-select}}
  1. using {{else}} block
{{#power-select
  options=templates
  selected=selectedTemplate
  onchange=(action "selectTemplate")
  searchField="name"
  searchEnabled=true
  as |template| }}
  {{template.name}}
{{else}}
  <span>Loading...</span>
{{/power-select}}

Unfortunately, 2nd way is being deprecated. Ref: cibernox/ember-power-select#1370

Screenshot:
2020-08-13_16-55-43 (1)

References

License

I confirm that this contribution is made under the terms of the license found in the root directory of this repository's source tree and that I have the authority necessary to make this contribution on behalf of its copyright owner.

@@ -51,6 +51,7 @@
onchange=(action "selectTemplate")
searchField="name"
searchEnabled=true
noMatchesMessage="Loading..."
Copy link
Member

@jithine jithine Aug 13, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this mean, if I search for something and it's not there in the list, it still shows Loading ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are correct. It will show Loading... for non-matched items. Let me update to handle that case.

@adong adong merged commit 915fb21 into master Aug 14, 2020
@adong adong deleted the adong/show-loading branch August 14, 2020 05:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants