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(VField): Applied text-align to input element #17895

Merged

Conversation

prashantsinghb
Copy link
Contributor

@prashantsinghb prashantsinghb commented Jul 28, 2023

fixes #17856

Description

Applied fieldClass to input element

Markup:

<template>
  <v-app>
    <v-container>
      <v-locale-provider rtl>
        <v-text-field v-model="msg" label="test" />
        <v-text-field v-model="msg" reverse label="test" />
        <v-textarea v-model="msg" label="test" />
        <v-textarea v-model="msg" reverse label="test" />
        <v-select
          label="Select"
          v-model="msg"
          :items="['California', 'Colorado', 'Florida', 'Georgia', 'Texas', 'Wyoming']"
        ></v-select>
        <v-select
          label="Select"
          v-model="msg"
          :items="['California', 'Colorado', 'Florida', 'Georgia', 'Texas', 'Wyoming']"
          reverse
        ></v-select>
      </v-locale-provider>
      <v-locale-provider ltr>
        <v-text-field v-model="msg" label="test" />
        <v-text-field v-model="msg" reverse label="test" />
        <v-textarea v-model="msg" label="test" />
        <v-textarea v-model="msg" reverse label="test" />
        <v-select
          v-model="msg"
          label="Select"
          :items="['California', 'Colorado', 'Florida', 'Georgia', 'Texas', 'Wyoming']"
        ></v-select>
        <v-select
          v-model="msg"
          label="Select"
          :items="['California', 'Colorado', 'Florida', 'Georgia', 'Texas', 'Wyoming']"
          reverse
        ></v-select>
      </v-locale-provider>
    </v-container>
  </v-app>
</template>

<script setup>
  import { ref } from 'vue'

  const msg = ref('California')
</script>

@johnleider
Copy link
Member

This causes visual issues
image

@johnleider johnleider added this to the v3.x.x milestone Aug 1, 2023
@johnleider johnleider added T: bug Functionality that does not work as intended/expected C: VTextField VTextField labels Aug 1, 2023
@prashantsinghb
Copy link
Contributor Author

@johnleider - Have removed the fieldClass from input element, and applied text align property via VField sass instead based on your feedback.
Please review.

@prashantsinghb prashantsinghb changed the title fix(VTextField): Applied fieldClass to input element fix(VTextField): Applied text-align to input element Aug 2, 2023
@prashantsinghb prashantsinghb changed the title fix(VTextField): Applied text-align to input element fix(VField): Applied text-align to input element Aug 2, 2023
@yuwu9145 yuwu9145 self-requested a review August 2, 2023 22:58
Copy link
Member

@yuwu9145 yuwu9145 left a comment

Choose a reason for hiding this comment

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

In v2 & v3 RTL support,

  • labels are right aligned as well: demo
  • Selections in select components are right aligned: demo

@prashantsinghb
Copy link
Contributor Author

@yuwu9145 - Have updated the fix as per you observation.
Please review.

@johnleider johnleider modified the milestones: v3.x.x, v3.3.x Aug 4, 2023
@johnleider
Copy link
Member

This passed tests locally:
image

@johnleider johnleider merged commit d428f62 into vuetifyjs:master Aug 4, 2023
9 of 10 checks passed
@prashantsinghb prashantsinghb deleted the fix/17856-VTextField-ltr-issue branch August 5, 2023 05:44
@yuwu9145
Copy link
Member

yuwu9145 commented Aug 5, 2023

image

But inner icon should be left aligned: v3 RTL

Probably it should be handled in an new issue

@prashantsinghb
Copy link
Contributor Author

@yuwu9145 - Could I look into the issueBut inner icon should be left aligned:v3 RTL.
Or you will handle this in #17960 ?

@yuwu9145
Copy link
Member

yuwu9145 commented Aug 6, 2023

Could I look into the issueBut inner icon should be left aligned:v3 RTL.

@prashantsinghb feel free to give it a crack.

#17960 is just an irrelevant improvement

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: VTextField VTextField T: bug Functionality that does not work as intended/expected
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug Report][3.3.9] reverse is not working in v-text-field in LTR direction
3 participants