From 913853e3bf2f76812dd2ae6d2edb5e9112fb607f Mon Sep 17 00:00:00 2001 From: Carol Soliman <17387510+carsoli@users.noreply.github.com> Date: Mon, 30 May 2022 20:05:28 +0200 Subject: [PATCH] fix(KtField*Select): implemented maximumSelectable properly - disable the rest of the options on multi-select if maximumSelectable is reached - feat: show `isUnsorted` prop on documentation - fix: `isInputVisible` by moving the input out of screen instead - this is to properly support tabbing into (focus) when the dropdown is closed - we can't tab/focus into a field if there's no input - fix: open the dropdown if the user starts typing into the field - in single selects, when user selects an option, the dropdown closes - the input still exists in the focused field yet the dropdown is closed - if the user starts typing, we open the dropdown again - it's an edge case that had weird UX previously - fix: horizontal scrollbar UI Co-Authored-By: Florian Wendelborn <1133858+FlorianWendelborn@users.noreply.github.com> --- .../pages/usage/components/form-fields.vue | 53 +++++++++--- .../kotti-ui/source/kotti-avatar/KtAvatar.vue | 4 +- .../kotti-field-select/KtFieldMultiSelect.vue | 4 +- .../KtFieldMultiSelectRemote.vue | 4 +- .../KtFieldSingleSelect.vue | 4 +- .../KtFieldSingleSelectRemote.vue | 4 +- .../components/ActionIcon.vue | 14 ++-- .../components/GenericSelectField.vue | 83 ++++++++++++------- .../kotti-field-select/components/Options.vue | 43 ++++++---- .../components/OptionsItem.vue | 5 +- .../hooks/use-select-tippy.ts | 5 +- .../source/kotti-field-select/types.ts | 4 +- .../kotti-ui/source/kotti-field/mixins.scss | 1 + .../source/kotti-filters/KtFilters.vue | 5 +- 14 files changed, 145 insertions(+), 88 deletions(-) diff --git a/packages/documentation/pages/usage/components/form-fields.vue b/packages/documentation/pages/usage/components/form-fields.vue index afcbab1030..3ad2c7c5ff 100644 --- a/packages/documentation/pages/usage/components/form-fields.vue +++ b/packages/documentation/pages/usage/components/form-fields.vue @@ -234,7 +234,7 @@