# moveTags (@salmonui/buttons/tag-group)

> The moveTags function of @salmonui/buttons/tag-group: Moves the entries whose value is in values to the insertion index toIndex of list (an index in the current order, before the moved entries are removed), keeping their relative order. A cross-group drop (onTagDrop) is a filter on the source and a splice on the target.

Canonical: https://salmonui.dev/docs/reference/buttons/tag-group/moveTags

```ts
import { moveTags } from '@salmonui/buttons/tag-group';
```

Entry index: https://salmonui.dev/docs/reference/buttons/tag-group (Markdown with every symbol of the entry: https://salmonui.dev/docs/reference/buttons/tag-group.md).

## Reference

Kind: function

```ts
function moveTags<T>(list: readonly T[], values: readonly string[], toIndex: number, getValue?: (item: T) => string): T[];
```

Moves the entries whose value is in `values` to the insertion index
`toIndex` of `list` (an index in the current order, before the moved
entries are removed), keeping their relative order. A cross-group drop
(`onTagDrop`) is a filter on the source and a splice on the target.
