From 5ee184a39bcb1879591bb67c1880b9e07b4eee7c Mon Sep 17 00:00:00 2001 From: Andrew Scott Date: Tue, 28 Jan 2025 12:49:30 -0800 Subject: [PATCH] docs: document new list params shorthands --- .../model-components/attributes/search.md | 2 +- docs/stacks/vue/layers/viewmodels.md | 33 ++++++++++++++----- 2 files changed, 26 insertions(+), 9 deletions(-) diff --git a/docs/modeling/model-components/attributes/search.md b/docs/modeling/model-components/attributes/search.md index 7cb3002c8..981bc9907 100644 --- a/docs/modeling/model-components/attributes/search.md +++ b/docs/modeling/model-components/attributes/search.md @@ -3,7 +3,7 @@ `IntelliTect.Coalesce.DataAnnotations.SearchAttribute` -Coalesce supports searching through the generated API in its various implementations, including the [admin pages](/stacks/vue/coalesce-vue-vuetify/components/c-admin-table-page.md) and through the [ListViewModels](/stacks/vue/layers/viewmodels.md#listviewmodels)'s `$params.search` properly. +Coalesce supports searching through the generated API in its various implementations, including the [admin pages](/stacks/vue/coalesce-vue-vuetify/components/c-admin-table-page.md) and through the [ListViewModels](/stacks/vue/layers/viewmodels.md#listviewmodels)'s `$search` property. The `search` parameter of the API can also be formatted as ``PropertyName:SearchTerm`` in order to search on an arbitrary property of a model. For example, a value of ``Nickname:Steve-o`` for a search term would search the `Nickname` property, even through it is not marked as searchable using this attribute. diff --git a/docs/stacks/vue/layers/viewmodels.md b/docs/stacks/vue/layers/viewmodels.md index 72147ac66..36f6962e8 100644 --- a/docs/stacks/vue/layers/viewmodels.md +++ b/docs/stacks/vue/layers/viewmodels.md @@ -298,13 +298,9 @@ This can be used to remove either a rule that was provided by the generated [Met Returns an array of active rule functions for the specified property, or `undefined` if the property has no active validation rules. - + -Returns a [generator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Generator) that provides all error messages for either a specific property (if provided) or the entire model (if no prop argument is provided). - -::: tip -You can obtain an array from a generator with `Array.from(vm.$getErrors())` or `[...vm.$getErrors()]` -::: +Returns an array of all error messages for either a specific property (if provided) or the entire model (if no prop argument is provided). @@ -393,12 +389,33 @@ Methods that will decrement or increment `$page`, respectively. Each does nothin -Getter/setter wrapper for `$params.page`. Controls the page that will be requested on the next invocation of `$load`. +Getter/setter wrapper for `$params.page`. Controls the page that will be requested for invocations of `$load`. -Getter/setter wrapper for `$params.pageSize`. Controls the page that will be requested on the next invocation of `$load`. +Getter/setter wrapper for `$params.pageSize`. Controls the page size that will be requested for invocations of `$load`. + + + + +Getter/setter wrapper for `$params.search`. Controls the search term that will be sent to invocations of `$load`. + +See [[Search]](/modeling/model-components/attributes/search.md) for a detailed look at how default searching works in Coalesce. + + + + +Getter/setter wrapper for `$params.filter`. Controls the filters that will be sent to invocations of `$load`. This is a dictionary-style object where keys are property names and values are the value to filter by, applied on server by the type's DataSource's [ApplyListPropertyFilters](/modeling/model-components/data-sources.md#member-applylistpropertyfilter) method according to the following default rules: + +@[import-md "after":"MARKER:filter-behaviors", "before":"MARKER:end-filter-behaviors"](../../../../src/coalesce-vue/src/api-client.ts) + +
+ + + + +Getter/setter wrapper for `$params.orderBy`. Controls the sorting that will be requested for invocations of `$load`.