How to use react-tag-input - 3 common examples

To help you get started, we’ve selected a few react-tag-input examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github invinst / CPDB / dashboard / static / dashboard / js / components / SettingSection.react.js View on Github external
var React = require('react');
var _ = require('lodash');
var ReactTags = require('react-tag-input').WithContext;

var Base = require('./Base.react');
var SettingSectionStore = require('../stores/SettingSectionStore');
var SettingAPI = require('utils/SettingAPI');
var SettingActions = require('actions/SettingActions');


var SettingSection = React.createClass(_.assign(Base(SettingSectionStore), {
  content: function () {
    var setting = this.state.setting;
    var crid = '{crid}';
    var link = '{link}';

    return (
      <div>
        <div></div></div>
github VulcanJS / Vulcan / packages / vulcan-forms-tags / lib / components / Tags.jsx View on Github external
import React, { PureComponent } from 'react';
import FRC from 'formsy-react-components';
import ReactTagInput from 'react-tag-input';
import PropTypes from 'prop-types';

const ReactTags = ReactTagInput.WithContext;

const Input = FRC.Input;

class Tags extends PureComponent {

  constructor(props) {
    super(props);
    this.handleDelete = this.handleDelete.bind(this);
    this.handleAddition = this.handleAddition.bind(this);

    const tags = props.value ? props.value.map(optionId => {
      return {
        id: optionId,
        text: _.findWhere(props.options, {value: optionId}).label
      };
    }) : [];
github VulcanJS / Vulcan / packages / nova-forms-tags / lib / components / Tags.jsx View on Github external
import React, { PropTypes, Component } from 'react';
import FRC from 'formsy-react-components';
import ReactTagInput from 'react-tag-input';

const ReactTags = ReactTagInput.WithContext;

const Input = FRC.Input;

class Tags extends Component {

  constructor(props) {
    super(props);
    this.handleDelete = this.handleDelete.bind(this);
    this.handleAddition = this.handleAddition.bind(this);

    const tags = props.value ? props.value.map(optionId => {
      return {
        id: optionId,
        text: _.findWhere(props.options, {value: optionId}).label
      };
    }) : [];

react-tag-input

React tags is a fantastically simple tagging component for your React projects

MIT
Latest version published 4 months ago

Package Health Score

80 / 100
Full package analysis

Popular react-tag-input functions