Aya Rabee
Aya Rabee

Reputation: 31

How to customize the direction of input's text that inside v-select

To customize the direction of the input placeholder in the v-select component based on the chosen language in a multilingual website.

<v-select
    v-model="add.city"
    :options="cities"
    :label="$store.getters['GET_LANG_NAME'] === 'ar' ? 'nameAr' : 'nameEn'"
    :placeholder="$t('addresses.city')"
    required
    class="select"
    :input-props="{ dir: $store.getters['GET_LANG_NAME'] === 'ar' ? 'rtl' : 'ltr', style: { textAlign: $store.getters['GET_LANG_NAME'] === 'ar' ? 'right' : 'left' }}"
>
</v-select>

i try to use a conditional approach to dynamically set the direction and alignment of the placeholder text. but it doesn't work

Upvotes: 0

Views: 59

Answers (0)

Related Questions