Skip to content

Commit

Permalink
Merge pull request #6881 from ScopeLift/fix-select-dropdown
Browse files Browse the repository at this point in the history
Fix token selection dropdown
  • Loading branch information
owocki authored Jun 16, 2020
2 parents ca60587 + 2178b3d commit 425205a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/assets/v2/js/grants/funding.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ function tokenOptionsForGrant(grant) {

if (tokenData.divider) {
options += `
<option disabled>_________</option>
<option disabled>&mdash;&mdash;&mdash;&mdash;</option>
`;
} else {
options += `
Expand Down
18 changes: 13 additions & 5 deletions app/grants/templates/grants/cart-vue.html
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ <h1 class="col-auto text-left font-bigger-2 black" style="font-weight: bold; mar
</div>
{% comment %} Cart Contents: MOBILE {% endcomment %}
<div v-if="isMobileDevice">
<div v-for="(grant, index) in grantData" class="grant-row">
<div v-for="(grant, index) in grantData" :key="grant.grant_id" class="grant-row">
<div class="grant-row-style">
<div class="row align-items-center justify-content-between">
{% comment %} Logo, title, and delete button {% endcomment %}
Expand All @@ -130,8 +130,12 @@ <h1 class="col-auto text-left font-bigger-2 black" style="font-weight: bold; mar
<div class="row flex-nowrap justify-content-between">
<input class="col-5 form-control" style="margin-left:0.5rem" min="0"
v-model="grant.grant_donation_amount" type="number" placeholder="Amount">
<select2 :options="currencies[index]" v-model="grant.grant_donation_currency"
class="col-6 form-control" style="margin-right:0.5rem" placeholder="Select token">
<select2 v-model="grant.grant_donation_currency" class="col-6 form-control"
style="margin-right:0.5rem" placeholder="Select token">
<option v-for="option in currencies[index]" v-bind:value="option" :disabled="!option">
<span v-if="!option" style="height:1px; font-size:1px">&mdash;&mdash;&mdash;&mdash;</span>
<span v-else>[[ option ]]</span>
</option>
</select2>
</div>
</div>
Expand Down Expand Up @@ -171,8 +175,12 @@ <h1 class="col-auto text-left font-bigger-2 black" style="font-weight: bold; mar
<div class="row flex-nowrap align-items-center justify-content-start">
<input class="col-6 form-control" v-model="grant.grant_donation_amount" type="number" min="0"
placeholder="Amount" style="margin-right: 1rem">
<select2 :options="currencies[index]" v-model="grant.grant_donation_currency"
class="col-6 form-control" placeholder="Select token">
<select2 v-model="grant.grant_donation_currency" class="col-6 form-control"
placeholder="Select token">
<option v-for="option in currencies[index]" v-bind:value="option" :disabled="!option">
<span v-if="!option" style="height:1px; font-size:1px">&mdash;&mdash;&mdash;&mdash;</span>
<span v-else>[[ option ]]</span>
</option>
</select2>
</div>
</div>
Expand Down

0 comments on commit 425205a

Please sign in to comment.