docs: update Data Table component API reference
This commit is contained in:
parent
a3b05b36ba
commit
dfc1b0e482
|
|
@ -477,6 +477,8 @@ export function valueUpdater<T extends Updater<any>>(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 `<DataTable>`
|
||||
|
||||
```ts:line-numbers showLineNumbers{4,7,16,34,41-44}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user