Skip to content

Commit

Permalink
fix(kpagination,ktableview): add missing import (#2542)
Browse files Browse the repository at this point in the history
  • Loading branch information
Justineo authored Dec 17, 2024
1 parent 21bc592 commit fdff434
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/components/KPagination/PaginationOffset.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

<script setup lang="ts">
import { BackIcon, ForwardIcon } from '@kong/icons'
import KButton from '@/components/KButton/KButton.vue'
defineProps({
previousButtonDisabled: {
Expand Down
10 changes: 6 additions & 4 deletions src/components/KTableView/ColumnVisibilityMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -103,22 +103,24 @@
<script setup lang="ts">
import { ref, watch, onBeforeMount, onMounted, nextTick, computed } from 'vue'
import type { PropType } from 'vue'
import type { TableHeader } from '@/types'
import type { TableDataHeader } from '@/types'
import { debounce } from '@/utilities/debounce'
import { SearchIcon, CloseIcon, TableColumnsIcon } from '@kong/icons'
import KButton from '@/components/KButton/KButton.vue'
import KCheckbox from '@/components/KCheckbox/KCheckbox.vue'
import KDropdown from '@/components/KDropdown/KDropdown.vue'
import KDropdownItem from '@/components/KDropdown/KDropdownItem.vue'
import KInput from '@/components/KInput/KInput.vue'
import KTooltip from '@/components/KTooltip/KTooltip.vue'
import KLabel from '@/components/KLabel/KLabel.vue'
const emit = defineEmits<{
(e: 'update', columnVisibility: Record<string, boolean>): void
}>()
const props = defineProps({
columns: {
type: Array as PropType<TableHeader[]>,
type: Array as PropType<TableDataHeader[]>,
required: true,
},
tableId: {
Expand All @@ -142,7 +144,7 @@ const menuItemsRef = ref<HTMLDivElement>()
const searchColumnInMenu = ref('')
const initVisibilityMap = (): void => {
visibilityMap.value = props.columns.reduce((acc, col: TableHeader) => {
visibilityMap.value = props.columns.reduce((acc, col: TableDataHeader) => {
acc[col.key] = props.visibilityPreferences[col.key] === undefined ? true : props.visibilityPreferences[col.key]
return acc
Expand All @@ -157,7 +159,7 @@ const handleSearch = debounce((search: any) => {
}
}, 500)
const filteredItems = computed((): TableHeader[] => {
const filteredItems = computed((): TableDataHeader[] => {
if (!searchColumnInMenu.value) {
return props.columns
}
Expand Down

0 comments on commit fdff434

Please sign in to comment.