function DragDropContextContainer() { _classCallCheck(this, DragDropContextContainer); return _possibleConstructorReturn(this, (DragDropContextContainer.__proto__ || Object.getPrototypeOf(DragDropContextContainer)). apply(this, arguments)); }
n/a
function ReactTags(props) { _classCallCheck(this, ReactTags); var _this = _possibleConstructorReturn(this, (ReactTags.__proto__ || Object.getPrototypeOf(ReactTags)).call(this, props)); _this.state = { suggestions: _this.props.suggestions, query: "", selectedIndex: -1, selectionMode: false }; _this.handleBlur = _this.handleBlur.bind(_this); _this.handleKeyDown = _this.handleKeyDown.bind(_this); _this.handleChange = _this.handleChange.bind(_this); _this.moveTag = _this.moveTag.bind(_this); _this.handlePaste = _this.handlePaste.bind(_this); _this.resetAndFocusInput = _this.resetAndFocusInput.bind(_this); _this.handleSuggestionHover = _this.handleSuggestionHover.bind(_this); _this.handleSuggestionClick = _this.handleSuggestionClick.bind(_this); return _this; }
n/a
function DragDropContextContainer() { _classCallCheck(this, DragDropContextContainer); return _possibleConstructorReturn(this, (DragDropContextContainer.__proto__ || Object.getPrototypeOf(DragDropContextContainer)). apply(this, arguments)); }
n/a
function ReactTags(props) { _classCallCheck(this, ReactTags); var _this = _possibleConstructorReturn(this, (ReactTags.__proto__ || Object.getPrototypeOf(ReactTags)).call(this, props)); _this.state = { suggestions: _this.props.suggestions, query: "", selectedIndex: -1, selectionMode: false }; _this.handleBlur = _this.handleBlur.bind(_this); _this.handleKeyDown = _this.handleKeyDown.bind(_this); _this.handleChange = _this.handleChange.bind(_this); _this.moveTag = _this.moveTag.bind(_this); _this.handlePaste = _this.handlePaste.bind(_this); _this.resetAndFocusInput = _this.resetAndFocusInput.bind(_this); _this.handleSuggestionHover = _this.handleSuggestionHover.bind(_this); _this.handleSuggestionClick = _this.handleSuggestionClick.bind(_this); return _this; }
n/a
allowDeleteFromEmptyInput = function () { [native code] }
n/a
autocomplete = function () { [native code] }
n/a
autofocus = function () { [native code] }
n/a
classNames = function () { [native code] }
n/a
delimiters = function () { [native code] }
n/a
handleAddition = function () { [native code] }
...
return String.fromCharCode(96 <= delimiter ? chrCode : delimiter);
}).join(""));
var clipboardData = e.clipboardData || window.clipboardData;
var string = clipboardData.getData("text");
var regExp = new RegExp("[" + delimiterChars + "]+");
string.split(regExp).forEach(function (tag) {
return _this2.props.handleAddition(tag);
});
}
}, {
key: "addTag",
value: function addTag(tag) {
if (this.props.autocomplete) {
var possibleMatches = this.filteredSuggestions(tag, this.props.suggestions);
...
handleDelete = function () { [native code] }
...
suggestions: suggestions,
classNames: _extends({}, DefaultClassNames, props.classNames)
});
}
}, {
key: "handleDelete",
value: function handleDelete(i, e) {
this.props.handleDelete(i);
this.setState({ query: "" });
this.resetAndFocusInput();
}
}, {
key: "handleChange",
value: function handleChange(e) {
if (this.props.handleInputChange) {
...
handleDrag = function () { [native code] }
...
var tags = this.props.tags;
// locate tags
var dragTag = tags[dragIndex];
// call handler with the index of the dragged tag
// and the tag that is hovered
this.props.handleDrag(dragTag, dragIndex, hoverIndex);
}
}, {
key: "render",
value: function render() {
var _this3 = this;
var moveTag = this.props.handleDrag ? this.moveTag : null;
...
handleFilterSuggestions = function () { [native code] }
...
value: function componentDidMount() {
this.resetAndFocusInput();
}
}, {
key: "filteredSuggestions",
value: function filteredSuggestions(query, suggestions) {
if (this.props.handleFilterSuggestions) {
return this.props.handleFilterSuggestions(query, suggestions);
}
return suggestions.filter(function (item) {
return item.toLowerCase().indexOf(query.toLowerCase()) === 0;
});
}
}, {
...
handleInputBlur = function () { [native code] }
...
});
}
}, {
key: "handleBlur",
value: function handleBlur(e) {
var value = e.target.value.trim();
if (this.props.handleInputBlur) {
this.props.handleInputBlur(value);
this.textInput.value = "";
}
}
}, {
key: "handleKeyDown",
value: function handleKeyDown(e) {
var _state = this.state,
...
handleInputChange = function () { [native code] }
...
this.setState({ query: "" });
this.resetAndFocusInput();
}
}, {
key: "handleChange",
value: function handleChange(e) {
if (this.props.handleInputChange) {
this.props.handleInputChange(e.target.value.trim());
}
var query = e.target.value.trim();
var suggestions = this.filteredSuggestions(query, this.props.suggestions);
var selectedIndex = this.state.selectedIndex;
if (selectedIndex >= suggestions.length) {
...
id = function () { [native code] }
n/a
inline = function () { [native code] }
n/a
labelField = function () { [native code] }
n/a
maxLength = function () { [native code] }
n/a
minQueryLength = function () { [native code] }
n/a
name = function () { [native code] }
n/a
placeholder = function () { [native code] }
n/a
readOnly = function () { [native code] }
n/a
removeComponent = function () { [native code] }
n/a
shouldRenderSuggestions = function () { [native code] }
n/a
suggestions = function () { [native code] }
n/a
dragDropManager = function () { [native code] }
n/a