From dfc1b0e4829e431a87ed598ea5fb0da49e4cd8a8 Mon Sep 17 00:00:00 2001 From: selemondev Date: Mon, 23 Oct 2023 18:26:19 +0300 Subject: [PATCH] docs: update Data Table component API reference --- apps/www/src/content/docs/components/data-table.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/www/src/content/docs/components/data-table.md b/apps/www/src/content/docs/components/data-table.md index 014042bb..cec3a907 100644 --- a/apps/www/src/content/docs/components/data-table.md +++ b/apps/www/src/content/docs/components/data-table.md @@ -477,6 +477,8 @@ export function valueUpdater>(updaterOrValue: T, ref: Ref } ``` +The `valueUpdater` function updates a Vue `ref` object's value. It handles both direct assignments and transformations using a function. If `updaterOrValue` is a function, it's called with the current `ref` value, and the result is assigned to `ref.value`. If it's not a function, it's directly assigned to `ref.value`. This utility enhances flexibility in updating `ref` values. While Vue `ref` can manage reactive state directly, `valueUpdater` simplifies value updates, improving code readability and maintainability when the new state can be a direct value or a function generating it based on the current one. + ### Update `` ```ts:line-numbers showLineNumbers{4,7,16,34,41-44}