Vue-select: Need vue-select dropdown direction props

Created on 13 Sep 2019  路  3Comments  路  Source: sagalbot/vue-select

Feature: Please add new props which can set the direction of dropdown list.

Expected:

<vue-select
  options={options}
  direction="bottom" (or "top" when I need to show the dropdown in upper direction)
  ...
/>

Thanks.

feature request

Most helpful comment

I wrote a CSS workaround for the time being, which requires a parent element to have the appropriate vue-select-up class. This works for my use case, and potentially for others waiting on this to be implemented.

.vue-select-up .v-select.open .dropdown-toggle {
  border-bottom-color: rgba(60,60,60,.26) !important;
  border-bottom-left-radius: 4px !important;
  border-bottom-right-radius: 4px !important;
  border-top-color: transparent;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.vue-select-up .v-select .dropdown-menu {
  top: auto !important;
  box-shadow: 0 -3px 6px 0 rgba(0,0,0,.15) !important;
  border-radius: 4px 4px 0 0 !important;
  border-top: 1px solid rgba(0,0,0,.26) !important;
  border-bottom: none !important;
  bottom: calc(100% - 1px);
}

All 3 comments

Proposed in #562. Will add to the roadmap.

I wrote a CSS workaround for the time being, which requires a parent element to have the appropriate vue-select-up class. This works for my use case, and potentially for others waiting on this to be implemented.

.vue-select-up .v-select.open .dropdown-toggle {
  border-bottom-color: rgba(60,60,60,.26) !important;
  border-bottom-left-radius: 4px !important;
  border-bottom-right-radius: 4px !important;
  border-top-color: transparent;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.vue-select-up .v-select .dropdown-menu {
  top: auto !important;
  box-shadow: 0 -3px 6px 0 rgba(0,0,0,.15) !important;
  border-radius: 4px 4px 0 0 !important;
  border-top: 1px solid rgba(0,0,0,.26) !important;
  border-bottom: none !important;
  bottom: calc(100% - 1px);
}
Was this page helpful?
0 / 5 - 0 ratings

Related issues

rafalolszewski94 picture rafalolszewski94  路  3Comments

ducdev picture ducdev  路  3Comments

theseawolves picture theseawolves  路  4Comments

xuwenhao picture xuwenhao  路  3Comments

gilles6 picture gilles6  路  3Comments