Squash merge rely-on-nostrmarket-to-publish into main
This commit is contained in:
parent
08b172ab34
commit
c90def94a7
23 changed files with 1739 additions and 239 deletions
10
src/components/ui/table/utils.ts
Normal file
10
src/components/ui/table/utils.ts
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
import type { Updater } from "@tanstack/vue-table"
|
||||
|
||||
import type { Ref } from "vue"
|
||||
import { isFunction } from "@tanstack/vue-table"
|
||||
|
||||
export function valueUpdater<T>(updaterOrValue: Updater<T>, ref: Ref<T>) {
|
||||
ref.value = isFunction(updaterOrValue)
|
||||
? updaterOrValue(ref.value)
|
||||
: updaterOrValue
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue