mirror of
https://github.com/Litlyx/litlyx
synced 2025-12-13 08:48:38 +01:00
new selfhosted version
This commit is contained in:
9
dashboard/components/ui/table/utils.ts
Normal file
9
dashboard/components/ui/table/utils.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import type { Updater } from '@tanstack/vue-table'
|
||||
import type { Ref } from 'vue'
|
||||
|
||||
export function valueUpdater<T extends Updater<any>>(updaterOrValue: T, ref: Ref) {
|
||||
ref.value
|
||||
= typeof updaterOrValue === 'function'
|
||||
? updaterOrValue(ref.value)
|
||||
: updaterOrValue
|
||||
}
|
||||
Reference in New Issue
Block a user