Browse Source

fix: limit multi-select width and add space between option and tick icon (#9659)

pull/9547/merge
Pranav C 1 month ago committed by GitHub
parent
commit
0d8083641f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      packages/nc-gui/components/cell/MultiSelect.vue
  2. 1
      packages/nc-gui/components/cell/SingleSelect.vue
  3. 6
      packages/nc-gui/components/smartsheet/toolbar/FilterInput.vue

2
packages/nc-gui/components/cell/MultiSelect.vue

@ -381,6 +381,7 @@ const onFocus = () => {
v-for="op of options" v-for="op of options"
:key="op.title" :key="op.title"
:value="op.title" :value="op.title"
class="gap-2"
:data-testid="`select-option-${column.title}-${location === 'filter' ? 'filter' : rowIndex}`" :data-testid="`select-option-${column.title}-${location === 'filter' ? 'filter' : rowIndex}`"
:class="`nc-select-option-${column.title}-${op.title}`" :class="`nc-select-option-${column.title}-${op.title}`"
> >
@ -487,6 +488,7 @@ const onFocus = () => {
v-for="op of options" v-for="op of options"
:key="op.id || op.title" :key="op.id || op.title"
:value="op.title" :value="op.title"
class="gap-2"
:data-testid="`select-option-${column.title}-${location === 'filter' ? 'filter' : rowIndex}`" :data-testid="`select-option-${column.title}-${location === 'filter' ? 'filter' : rowIndex}`"
:class="`nc-select-option-${column.title}-${op.title}`" :class="`nc-select-option-${column.title}-${op.title}`"
@click.stop @click.stop

1
packages/nc-gui/components/cell/SingleSelect.vue

@ -407,6 +407,7 @@ const onFocus = () => {
v-for="op of options" v-for="op of options"
:key="op.title" :key="op.title"
:value="op.title" :value="op.title"
class="gap-2"
:data-testid="`select-option-${column.title}-${rowIndex}`" :data-testid="`select-option-${column.title}-${rowIndex}`"
:class="`nc-select-option-${column.title}-${op.title}`" :class="`nc-select-option-${column.title}-${op.title}`"
@click.stop @click.stop

6
packages/nc-gui/components/smartsheet/toolbar/FilterInput.vue

@ -197,6 +197,10 @@ const isInputBoxOnFocus = ref(false)
// provide the following to override the default behavior and enable input fields like in form // provide the following to override the default behavior and enable input fields like in form
provide(ActiveCellInj, ref(true)) provide(ActiveCellInj, ref(true))
provide(IsFormInj, ref(true)) provide(IsFormInj, ref(true))
const isSingleOrMultiSelect = computed(() => {
return filterType.value === 'isSingleSelect' || filterType.value === 'isMultiSelect'
})
</script> </script>
<template> <template>
@ -209,7 +213,7 @@ provide(IsFormInj, ref(true))
<div <div
v-else v-else
class="bg-white border-1 flex flex-grow min-h-4 h-full px-1 items-center nc-filter-input-wrapper !rounded-lg" class="bg-white border-1 flex flex-grow min-h-4 h-full px-1 items-center nc-filter-input-wrapper !rounded-lg"
:class="{ 'px-2': hasExtraPadding, 'border-brand-500': isInputBoxOnFocus }" :class="{ 'px-2': hasExtraPadding, 'border-brand-500': isInputBoxOnFocus, '!max-w-100': isSingleOrMultiSelect }"
@mouseup.stop @mouseup.stop
> >
<component <component

Loading…
Cancel
Save