Menu

Important: This documentation is about an older version. It's relevant only to the release noted, many of the features and functions have been updated or replaced. Please view the current version.

Enterprise Open source

TagsInput class

Signature

typescript
export declare class TagsInput extends PureComponent<Props, State> 

Import

typescript
import { TagsInput } from '@grafana/ui';

Constructors

ConstructorModifiersDescription
constructor(props)Constructs a new instance of the TagsInput class

Properties

PropertyModifiersTypeDescription
onAdd(event: React.MouseEvent) => void
onChange() => void
onKeyboardAdd(event: KeyboardEvent) => void
onNameChange(event: ChangeEvent<HTMLInputElement>) => void
onRemove(tagToRemove: string) => void
setNewTags() => void

Methods

MethodModifiersDescription
render()

constructor(props)

Constructs a new instance of the TagsInput class

Signature

typescript
constructor(props: Props);

Parameters

ParameterTypeDescription
propsProps

onAdd property

Signature

typescript
onAdd: (event: React.MouseEvent) => void;

onChange property

Signature

typescript
onChange: () => void;

onKeyboardAdd property

Signature

typescript
onKeyboardAdd: (event: KeyboardEvent) => void;

onNameChange property

Signature

typescript
onNameChange: (event: ChangeEvent<HTMLInputElement>) => void;

onRemove property

Signature

typescript
onRemove: (tagToRemove: string) => void;

setNewTags property

Signature

typescript
setNewTags: () => void;

render method

Signature

typescript
render(): JSX.Element;

Returns:

JSX.Element