Skip to content

c-select-many-to-many

A multi-select dropdown component that allows for selecting values fetched from the generated /list API endpoints for collection navigation properties that were annotated with [ManyToMany].

TIP

It is unlikely that you'll ever need to use this component directly - it is highly recommended that you use c-input instead and let it delegate to c-select-many-to-many for you.

Examples

template
<c-select-many-to-many :model="case" for="caseProducts" />
template
<c-select-many-to-many 
    :model="case" 
    for="caseProducts" 
    dense
    outlined
/>
template
<c-select-many-to-many 
    v-model="case.caseProducts" 
    for="Case.caseProducts" 
/>

Props

for: string | Property | Value

A metadata specifier for the value being bound. One of:

  • A string with the name of the value belonging to model.
  • A direct reference to a metadata object.
  • A string in dot-notation that starts with a type name.

Note

c-select-many-to-many expects metadata for the "real" collection navigation property on a model. If you provide it the string you passed to [ManyToMany], an error wil be thrown.

model?: Model

An object owning the value that was specified by the for prop. If provided, the input will be bound to the corresponding property on the model object.

value?: any // Vue 2
modelValue?: any // Vue 3

If binding the component with v-model, accepts the value part of v-model.

params?: ListParameters

An optional set of Data Source Standard Parameters to pass to API calls made to the server.

cache?: ResponseCachingConfiguration | boolean

If provided and non-false, enables response caching on the component's internal API caller.

Events

The following events and automatic API calls are only used when bound to a model that has auto-saves enabled.

  • adding - Fired when a new item has been selected, but before the call to /save has completed.
  • added - Fired when the call to /save has completed after adding a new item.
  • deleting - Fired when an item has been removed, but before the call to /delete has completed.
  • deleted - Fired when the call to /delete has completed after removing an item.

Coalesce is a free and open-source framework created by IntelliTect to fill our desire to create better apps, faster. IntelliTect is a high-end software architecture and development consulting firm based in Spokane, Washington.

If you're looking for help with your software project, whether it be a Coalesce application, other technologies, or even just an idea, reach out to us at info@intellitect.com — we'd love to start a conversation! Our clients range from Fortune 100 companies to local small businesses and non-profits.