From 4d5856eec97f6dd7f08fd3af9a4e581aea34bed1 Mon Sep 17 00:00:00 2001 From: udithaOHRM <137746067+udithaOHRM@users.noreply.github.com> Date: Mon, 20 Nov 2023 08:51:06 +0530 Subject: [PATCH] Feature - ccs autocomplete dropdown display all items (#741) * scrollbar added * show all items * comment fixes * use oxd-scrollbar mixing * change log updated * change log order changed --- changelog.md | 4 ++++ .../components/Input/Autocomplete/AutocompleteInput.vue | 6 +----- .../components/Input/Autocomplete/autocomplete-input.scss | 3 +++ 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/changelog.md b/changelog.md index 2d5a2eff2..c1344b68f 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,7 @@ +2023-11-17 - a1cbc0a5bc9386bc415452108100a005b4e196d0 - AutocompleteInput.vue - Removed limitation (5 result) of autocomplete result list + +2023-11-17 - 0a400c7f9be38c5809a5ad75425f9b4d987618a4 - autocomplete-input.scss - oxd-autocomplete-dropdown set max height and scrollbar added + 2023-02-22 - 38a57d11c250022d6116fbcb1f71e78125abe5b3 - List/List.vue - Added prop support for No data found message and icon 2023-01-26 - 3e627e7fbd8a8a40c929a1df6256893dbc17bcb8 - Input/Autocomplet/AutocompleteInput.vue - handled search term resetting issue in autcompleteinput when on keypress enter diff --git a/components/src/core/components/Input/Autocomplete/AutocompleteInput.vue b/components/src/core/components/Input/Autocomplete/AutocompleteInput.vue index 0aabbb118..0b3eff42e 100644 --- a/components/src/core/components/Input/Autocomplete/AutocompleteInput.vue +++ b/components/src/core/components/Input/Autocomplete/AutocompleteInput.vue @@ -276,11 +276,7 @@ export default defineComponent({ }).then(resolved => { this.loading = false; if (resolved && Array.isArray(resolved)) { - if (resolved.length > 0) { - this.options = resolved.slice(0, 5); - } else { - this.options = []; - } + this.options = resolved; } else { throw new Error('options returned are not array'); } diff --git a/components/src/core/components/Input/Autocomplete/autocomplete-input.scss b/components/src/core/components/Input/Autocomplete/autocomplete-input.scss index 462eba72f..653eb19c8 100644 --- a/components/src/core/components/Input/Autocomplete/autocomplete-input.scss +++ b/components/src/core/components/Input/Autocomplete/autocomplete-input.scss @@ -101,6 +101,8 @@ } .oxd-autocomplete-dropdown { + max-height: 250px; + overflow-y: auto; position: absolute; width: inherit; box-sizing: border-box; @@ -111,6 +113,7 @@ box-shadow: $oxd-dropdown-dropdown-box-shadow; border-radius: $oxd-dropdown-dropdown-border-radius; background-color: $oxd-dropdown-dropdown-background; + @include oxd-scrollbar(); &.--positon-top { bottom: 100%; margin-bottom: $oxd-dropdown-dropdown-margin;