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(VListItem): subtitle wrong font #18720

Merged
merged 4 commits into from
Nov 28, 2023

Conversation

korpusovmax
Copy link
Contributor

fixes #18719

Description

Changed prop condition (props.subtitle) to (props.subtitle !== undefined), as subtitle can be a number (subtitle: [String, Number, Boolean]), and for this reason, if subtitle was 0 (not a string), there was a bug.

Markup:

Code from the issue, now working fine:

<template>
  <v-app>
    <v-container>
      <v-list>
        <v-list-item title="Subtitle is zero" :subtitle="0"></v-list-item>
        <v-list-item title="Subtitle is one" :subtitle="1"></v-list-item>
      </v-list>
    </v-container>
  </v-app>
</template>

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

  const msg = ref('Hello World!')
</script>

@korpusovmax korpusovmax changed the title fix(VListItem): subtitle wrong font fix(VListItem): subtitle wrong font #18719 Nov 18, 2023
@korpusovmax korpusovmax changed the title fix(VListItem): subtitle wrong font #18719 fix(VListItem): subtitle wrong font Nov 19, 2023
@johnleider
Copy link
Member

I'm not sure what the reason was for making subtitle a [String, Number, Boolean], but I think this was a mistake, as everywhere else we use String.

I'd be open to changing this to [Number, String] for all components, VCard/VCardItem/VStepperItem/etc and the corresponding checks to props.subtitle != null.

@MajesticPotatoe MajesticPotatoe added T: bug Functionality that does not work as intended/expected C: VListItem labels Nov 22, 2023
Copy link
Member

@johnleider johnleider left a comment

Choose a reason for hiding this comment

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

Please change the !== null comparisons to != null. Otherwise looks good.

@johnleider johnleider added this to the v3.4.x milestone Nov 27, 2023
@johnleider johnleider merged commit 4cad91f into vuetifyjs:master Nov 28, 2023
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: VListItem 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.4.2] List Item subtitle font wrong when value is "0"
3 participants