Home
NexoPOS

ns-multiselect

Overview

The ns-multiselect component lets users select multiple options from a searchable dropdown. Selected options are displayed as removable pills.

Props and events

  • field: required field definition with options and an array-like value.
  • Emits addOption when an option is selected.
  • Emits removeOption when a selected option is removed.
  • Declares change and blur events for parent integrations.

When used through ns-field, the parent ns-field component handles addOption and removeOption by updating field.value from selected options.

const field = {
    name: 'roles',
    label: 'Roles',
    type: 'multiselect',
    value: ['cashier'],
    options: [
        { label: 'Cashier', value: 'cashier' },
        { label: 'Manager', value: 'manager' }
    ],
    errors: []
};
<ns-field :field="field" />