How to make an append item always visible in v-select vuetify

3.1k Views Asked by At

I have a vuetify v-select dropdown. Inside I made a slot #append-item in which I have a button "validate" I want the button to always be visible when I scroll inside the dropdown.

enter image description here

2

There are 2 best solutions below

1
On BEST ANSWER

Wrap your button with a div having the append class name :

 <template #append-item>
              <div class="append">
                <v-btn color="primary">valider</v-btn>
              </div>
 </template>

that class should have the following css rules :

.append{
  position:sticky;
  bottom:8px;
  width:100%;
  display:flex;
  justify-content :center;
  background :white;
  
}

LIVE DEMO

0
On

I added this style to my "validate" button and it worked:

.append {
  position: sticky;
  bottom: 0;
  background: white;
}


    <template #append-item>

      <div class="append">
        <v-btn color="primary">
          Validate
        </v-btn>
      </div>
    </template>