Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ export default Example;
| `classNames` | className for styling input and tags (i.e {tag:'tag-cls', input: 'input-cls'}) | `object[tag, input]` | |
| `onKeyUp` | input `onKeyUp` callback | `event` | |
| `onBlur` | input `onBlur` callback | `event` | |
| `separators` | when to add tag (i.e. `"Enter"`, `" "`) | `string[]` | `["Enter"]` |
| `onFocus` | input `onFocus` callback | `event` | |
| `separators` | when to add tag (i.e. `"Enter"`, `" "`) | `string[]` | `["Enter"]` |
| `removers` | Remove last tag if textbox empty and `Backspace` is pressed | `string[]` | `["Backspace"]` |
| `onExisting` | if tag is already added then callback | `(tag: string) => void` | |
| `onRemoved` | on tag removed callback | `(tag: string) => void` | |
Expand Down
3 changes: 3 additions & 0 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export interface TagsInputProps {
placeHolder?: string;
value?: string[];
onChange?: (tags: string[]) => void;
onFocus?: any;
onBlur?: any;
separators?: string[];
disableBackspaceRemove?: boolean;
Expand All @@ -33,6 +34,7 @@ export const TagsInput = ({
placeHolder,
value,
onChange,
onFocus,
onBlur,
separators,
disableBackspaceRemove,
Expand Down Expand Up @@ -107,6 +109,7 @@ export const TagsInput = ({
name={name}
placeholder={placeHolder}
onKeyDown={handleOnKeyUp}
onFocus={onFocus}
onBlur={onBlur}
disabled={disabled}
onKeyUp={onKeyUp}
Expand Down