-
Notifications
You must be signed in to change notification settings - Fork 1.8k
fix: Only show country dropdown without autocomplete #5652
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
Merged
iamareebjamal
merged 25 commits into
fossasia:development
from
divyamtayal:only-countries-5438
Nov 20, 2020
Merged
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
8bc8dd9
Show Payment countries only
3fd3e20
Merge branch 'development' into only-countries-5438
30fa5eb
autoComplete-off
c00e2dc
Merge branch 'development' into only-countries-5438
80f4e08
Revert Changes
fb31c0a
Removed Autocomplete
6bcbe8d
Merge branch 'development' into only-countries-5438
2e1db2e
Fixed Bug
3b0145f
only-countries
0c82dd4
Merge branch 'development' into only-countries-5438
68114a6
Merge branch 'development' into only-countries-5438
78bfcf1
Added country-dropdown comp
33d55e0
Field required
3a60beb
Merge branch 'development' into only-countries-5438
70b332c
code-cleanup
7245faa
Merge branch 'development' into only-countries-5438
4bcd9e8
Improved code
7f735e7
Update country-dropdown.ts
bb6f3aa
Improved code-1
f45bce3
Code cleanup
0007745
Improved code-2
f688a9c
Merge branch 'development' into only-countries-5438
002f4dd
Added id
6f25411
Merge branch 'only-countries-5438' of https://github.com/daretobediff…
20cdc1a
f
iamareebjamal File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import Component from '@glimmer/component'; | ||
import { orderBy, filter } from 'lodash-es'; | ||
import { paymentCountries } from 'open-event-frontend/utils/dictionary/payment'; | ||
import { countries, Country } from 'open-event-frontend/utils/dictionary/demography'; | ||
|
||
export default class CountryDropdown extends Component { | ||
get countries(): Country[] { | ||
return orderBy(countries, 'name'); | ||
} | ||
|
||
get paymentCountries(): Country[] { | ||
return orderBy(filter(countries, country => paymentCountries.includes(country.code)), 'name'); | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<form class="field"> | ||
<label class={{if @required 'required'}}>{{@placeholder}}</label> | ||
<UiDropdown | ||
@class="search selection" | ||
@selected={{@val}} | ||
@forceSelection={{false}} | ||
@fullTextSearch={{true}}> | ||
<Input | ||
@type="hidden" | ||
@autocomplete="no" | ||
@value={{@val}} | ||
@id={{@id}} /> | ||
<i class="dropdown icon"></i> | ||
<div class="default text">{{t 'Select country'}}</div> | ||
<div class="menu"> | ||
{{#each (if @paymentCountries this.paymentCountries this.countries) as |country|}} | ||
<div class="item" data-value="{{country.name}}"> | ||
<i class="{{lowercase country.code}} flag"></i> | ||
{{country.name}} | ||
</div> | ||
{{/each}} | ||
</div> | ||
</UiDropdown> | ||
</form> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.