Skip to content

Commit

Permalink
chore: generate bundle for pw webkit timer bug
Browse files Browse the repository at this point in the history
  • Loading branch information
nekolab committed Dec 5, 2023
1 parent 8c1a93d commit be20409
Showing 1 changed file with 36 additions and 2 deletions.
38 changes: 36 additions & 2 deletions packages/entities/entities-snis/src/components/SniList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
:empty-state-options="emptyStateOptions"
enable-entity-actions
:error-message="errorMessage"
:fetcher="fetcher"
:fetcher="dummyFetcher"
:fetcher-cache-key="fetchCacheKey"
pagination-type="offset"
preferences-storage-key="kong-ui-entities-snis-list"
Expand Down Expand Up @@ -304,7 +304,30 @@ const filterConfig = computed<InstanceType<typeof EntityFilter>['$props']['confi
} as FuzzyMatchFilterConfig
})
const { fetcher, fetcherState } = useFetcher(props.config, fetcherBaseUrl.value)
const { fetcherState } = useFetcher(props.config, fetcherBaseUrl.value)
const dummyFetcher = async (param: any) => {
const { query } = param
await new Promise(resolve => setTimeout(resolve, 100))
const data = new Array(2).fill('').map((_, i) => {
return { id: `${i}`, name: `test${i}` }
})
let result = data
if (query) {
const [key, value] = query.split('=')
if (key === 'name') {
result = result.filter((item: any) => item.name === value)
}
}
return {
data: result,
total: result.length,
}
}
const clearFilter = (): void => {
filterQuery.value = ''
Expand Down Expand Up @@ -464,6 +487,17 @@ watch(fetcherState, (state) => {
errorMessage.value = null
})
watch(filterQuery, val => {
console.log(`[${Date.now()}] filterQuery changed to: ${val}`)
const t = Date.now()
console.log(`[${t}] Start on page reference timer`)
setTimeout(() => {
const n = Date.now()
console.log(`[${n}] On page reference timer 1000ms = ${n - t}ms`)
}, 1000)
})
onBeforeMount(async () => {
// Evaluate if the user has create permissions
const userCanCreate = await props.canCreate()
Expand Down

0 comments on commit be20409

Please sign in to comment.