4

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

Boussadjra Brahim
  • 82,684
  • 19
  • 144
  • 164
fakhfakh emna
  • 73
  • 2
  • 8

2 Answers2

4

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

Boussadjra Brahim
  • 82,684
  • 19
  • 144
  • 164
2

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>
fakhfakh emna
  • 73
  • 2
  • 8