0

As you can see from title, I tried to change the placeholder text which says "No results match" and which is grey-out(disabled) from a selected tag.

I tried with "placeholder" but it doesn't work.

<div>
    <select chosen disable-search="true" id="newpaymentMethod"
            placeholder="Placeholder text"
            class="easytrade-input full-width" name="newpaymentMethod"
            ng-model="vm.newRecord.paymentMethod"
            ng-options="paymentMethod.type as paymentMethod.description
                for paymentMethod in vm.paymentMethodOptions"
            required>
    </select>
</div>

Then I tried with "no_results_text", still doesn't work

<div>
    <select chosen disable-search="true" id="newpaymentMethod"
            no_results_text="Placeholder test"
            class="easytrade-input full-width" name="newpaymentMethod"
            ng-model="vm.newRecord.paymentMethod"
            ng-options="paymentMethod.type as paymentMethod.description
                for paymentMethod in vm.paymentMethodOptions"
            required>
    </select>
</div>

Any idea about it ? Thanks

Florin Lei
  • 521
  • 8
  • 16

1 Answers1

1

After I have checked the GitHub documentation of Angular-Chosen, I found how to use the "no_result_text".

Please see below piece of code :

<div>
    <select chosen disable-search="true" id="newpaymentMethod"
            no-results-text="'Placeholder test'"
            class="easytrade-input full-width" name="newpaymentMethod"
            ng-model="vm.newRecord.paymentMethod"
            ng-options="paymentMethod.type as paymentMethod.description
                for paymentMethod in vm.paymentMethodOptions"
            required>
    </select>
</div>

So you have to use "no-results-text" instead of "no_results_text" and also the text should be wrap in ' ' like following " 'text here' "

Hope will help someone my answer :)

Florin Lei
  • 521
  • 8
  • 16