Commit cdac49ef authored by Дмитрий Малюгин's avatar Дмитрий Малюгин 🕓
Browse files

fix: Select and Table

parent 8ae6a941
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
{
  "name": "@d.malygin/UI_storybook",
  "version": "1.0.16",
  "version": "1.0.17",
  "type": "module",
  "scripts": {
    "dev": "vite",
+1 −0
Original line number Diff line number Diff line
@@ -211,6 +211,7 @@ export interface ISelectProps {
  groups?: ISelectGroup[];
  selected?: string;
  width?: string;
  listHeight?: string;
  placeholder?: string;
  openIcon?: TIcon;
  size?: TSize;
+4 −2
Original line number Diff line number Diff line
@@ -117,7 +117,7 @@ document.querySelector('body')!.addEventListener('pointerup', (e: MouseEvent) =>
          }; font-weight: 600`"
        >
          <slot :name="`icon-left-${selectedOption?.value}`"></slot>
          <span class="text" :style="`font-size: ${fontSize}; width: ${selectedTextWidth}`">{{
          <span class="text" :style="`font-size: ${fontSize}; color: inherit; width: ${selectedTextWidth}`">{{
            selected ?? placeholder
          }}</span>
          <slot :name="`icon-right-${selectedOption?.value}`"></slot>
@@ -137,7 +137,7 @@ document.querySelector('body')!.addEventListener('pointerup', (e: MouseEvent) =>
          },
        ]"
      >
        <div style="overflow: hidden">
        <div :style="`overflow: auto; height: ${listHeight ?? 'auto'}`">
          <div class="flex filter" v-if="filtered" @click="isOpen = true">
            <input v-model="filter" type="text" /><SearchIcon :size="fontSizeNumber" color="#62708c" />
          </div>
@@ -234,6 +234,7 @@ document.querySelector('body')!.addEventListener('pointerup', (e: MouseEvent) =>
  gap: 5px;
}
.options {
  pointer-events: none;
  position: absolute;
  z-index: 1;
  top: 101%;
@@ -248,6 +249,7 @@ document.querySelector('body')!.addEventListener('pointerup', (e: MouseEvent) =>
    opacity 0.1s ease-in-out;
}
.optionsOpened {
  pointer-events: auto;
  grid-template-rows: 1fr;
  opacity: 1;
  z-index: 5000;
+95 −91
Original line number Diff line number Diff line
@@ -117,6 +117,7 @@ const updateData = (newValue: Ref<unknown>, rowIndex: number, columnIndex: numbe
</script>

<template>
  <section>
    <table
      :class="{
        tableLines: showAllLines,
@@ -164,7 +165,9 @@ const updateData = (newValue: Ref<unknown>, rowIndex: number, columnIndex: numbe
            v-for="(item, columnIndex) of row"
            :key="columnIndex"
            @click="
            handlers ? handlers.find((i) => i.cell?.[0] === rowIndex && i.cell?.[1] === columnIndex)?.handler?.() : null
              handlers
                ? handlers.find((i) => i.cell?.[0] === rowIndex && i.cell?.[1] === columnIndex)?.handler?.()
                : null
            "
            :class="{
              leftBorder: showAllLines,
@@ -212,6 +215,7 @@ const updateData = (newValue: Ref<unknown>, rowIndex: number, columnIndex: numbe
        class="paginator"
      />
    </div>
  </section>
</template>

<style scoped>