vuetify icon indicating copy to clipboard operation
vuetify copied to clipboard

feat(VListItem): add inactive prop

Open KaelWD opened this issue 2 years ago • 1 comments

resolves #11149 fixes #15042

This only removes the active styling from links or selected items. In v2 it would also suppress to/href/@click and just render a plain div, which seems pretty pointless aside from @click as you could just remove to/href for the same behaviour. Should we bring that back, leave it like this, or make :active and :link undefined by default and able to accept false like #15042 assumed?

Markup:

<template>
  <v-app>
    <v-container>
      <v-list nav>
        <v-list-item title="Active" to="/" />
        <v-list-item title="Inactive" inactive to="/" />
        <v-list-item title="Click" @click="" />
      </v-list>
    </v-container>
  </v-app>
</template>

KaelWD avatar Jul 06 '22 16:07 KaelWD

{
  active: {
    type: Boolean,
    default: undefined,
  },
}
  • If active is undefined, infer active styling from model, props, listeners, etc
  • If active is true, force active styling on
  • If active is false, force active styling off

Thoughts?

johnleider avatar Jul 15 '22 20:07 johnleider