From c4a727d91ffe4d9e8317b99729027b80e916d3e0 Mon Sep 17 00:00:00 2001 From: Gabriel Araujo Date: Thu, 10 Nov 2022 12:59:29 -0300 Subject: [PATCH] feat: adding hasScroll property --- src/assets/scss/_selectinput.scss | 2 +- .../SelectInput/SelectInput.stories.js | 21 +++++++++++++++++++ src/components/SelectInput/SelectInput.vue | 14 ++++++++++++- 3 files changed, 35 insertions(+), 2 deletions(-) diff --git a/src/assets/scss/_selectinput.scss b/src/assets/scss/_selectinput.scss index 1b88f54c..27c3dc31 100644 --- a/src/assets/scss/_selectinput.scss +++ b/src/assets/scss/_selectinput.scss @@ -93,7 +93,7 @@ } .options-list { - @apply bg-white w-full overflow-y-auto pr-3 pt-1 mt-2; + @apply bg-white w-full pr-3 pt-1 mt-2; max-height: 160px; /* width */ diff --git a/src/components/SelectInput/SelectInput.stories.js b/src/components/SelectInput/SelectInput.stories.js index 21efad78..457f53e8 100644 --- a/src/components/SelectInput/SelectInput.stories.js +++ b/src/components/SelectInput/SelectInput.stories.js @@ -32,6 +32,26 @@ const Template = (args, { argTypes }) => ({ value: '2', name: 'Sou um integrador e quero tirar dúvidas', }, + { + value: '3', + name: 'Sou um integrador e quero tirar dúvidas', + }, + { + value: '4', + name: 'Sou um integrador e quero tirar dúvidas', + }, + { + value: '5', + name: 'Sou um integrador e quero tirar dúvidas', + }, + { + value: '6', + name: 'Sou um integrador e quero tirar dúvidas', + }, + { + value: '7', + name: 'Sou um integrador e quero tirar dúvidas', + }, ], inputModel: '2', }; @@ -46,4 +66,5 @@ Default.args = { id: 'select', searchable: true, placeholder: 'Selecione', + hasScroll: true, }; diff --git a/src/components/SelectInput/SelectInput.vue b/src/components/SelectInput/SelectInput.vue index c888c6ba..b85784ab 100644 --- a/src/components/SelectInput/SelectInput.vue +++ b/src/components/SelectInput/SelectInput.vue @@ -60,7 +60,7 @@ placeholder="Busque aqui" class="shadow-none" /> -