How to use rc-select - 8 common examples

To help you get started, we’ve selected a few rc-select 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 godaner / vm-engine / vm-backend / src / main / resources / static / node_modules / antd / lib / auto-complete / index.js View on Github external
}
                }) : [];
            }
            return _react2['default'].createElement(
                _select2['default'],
                (0, _extends3['default'])({}, this.props, { className: cls, mode: 'combobox', optionLabelProp: optionLabelProp, getInputElement: this.getInputElement, notFoundContent: notFoundContent }),
                options
            );
        }
    }]);
    return AutoComplete;
}(_react2['default'].Component);

exports['default'] = AutoComplete;

AutoComplete.Option = _rcSelect.Option;
AutoComplete.OptGroup = _rcSelect.OptGroup;
AutoComplete.defaultProps = {
    prefixCls: 'ant-select',
    transitionName: 'slide-up',
    optionLabelProp: 'children',
    choiceTransitionName: 'zoom',
    showSearch: false,
    filterOption: false
};
module.exports = exports['default'];
github sikidamjanovic / cowrite / node_modules / antd / lib / auto-complete / index.js View on Github external
options = dataSource ? dataSource.map(function (item) {
          if (React.isValidElement(item)) {
            return item;
          }

          switch (_typeof(item)) {
            case 'string':
              return React.createElement(_rcSelect.Option, {
                key: item
              }, item);

            case 'object':
              return React.createElement(_rcSelect.Option, {
                key: item.value
              }, item.text);

            default:
              throw new Error('AutoComplete[dataSource] only supports type `string[] | Object[]`.');
          }
        }) : [];
      }
github godaner / vm-engine / vm-backend / src / main / resources / static / node_modules / antd / lib / select / index.js View on Github external
optionLabelProp = optionLabelProp || 'value';
            }
            var modeConfig = {
                multiple: mode === 'multiple' || multiple,
                tags: mode === 'tags' || tags,
                combobox: isCombobox
            };
            return _react2['default'].createElement(_rcSelect2['default'], (0, _extends3['default'])({}, restProps, modeConfig, { prefixCls: prefixCls, className: cls, optionLabelProp: optionLabelProp || 'children', notFoundContent: notFoundContent }));
        }
    }]);
    return Select;
}(_react2['default'].Component);

exports['default'] = Select;

Select.Option = _rcSelect.Option;
Select.OptGroup = _rcSelect.OptGroup;
Select.defaultProps = {
    prefixCls: 'ant-select',
    showSearch: false,
    transitionName: 'slide-up',
    choiceTransitionName: 'zoom'
};
Select.propTypes = SelectPropTypes;
Select.contextTypes = {
    antLocale: _propTypes2['default'].object
};
module.exports = exports['default'];
github godaner / vm-engine / vm-backend / src / main / resources / static / node_modules / antd / lib / auto-complete / index.js View on Github external
options = dataSource ? dataSource.map(function (item) {
                    if (_react2['default'].isValidElement(item)) {
                        return item;
                    }
                    switch (typeof item === 'undefined' ? 'undefined' : (0, _typeof3['default'])(item)) {
                        case 'string':
                            return _react2['default'].createElement(
                                _rcSelect.Option,
                                { key: item },
                                item
                            );
                        case 'object':
                            return _react2['default'].createElement(
                                _rcSelect.Option,
                                { key: item.value },
                                item.text
                            );
                        default:
                            throw new Error('AutoComplete[dataSource] only supports type `string[] | Object[]`.');
                    }
                }) : [];
            }
github sikidamjanovic / cowrite / node_modules / antd / lib / auto-complete / index.js View on Github external
key: "blur",
    value: function blur() {
      this.select.blur();
    }
  }, {
    key: "render",
    value: function render() {
      return React.createElement(_configProvider.ConfigConsumer, null, this.renderAutoComplete);
    }
  }]);

  return AutoComplete;
}(React.Component);

exports["default"] = AutoComplete;
AutoComplete.Option = _rcSelect.Option;
AutoComplete.OptGroup = _rcSelect.OptGroup;
AutoComplete.defaultProps = {
  transitionName: 'slide-up',
  optionLabelProp: 'children',
  choiceTransitionName: 'zoom',
  showSearch: false,
  filterOption: false
};
//# sourceMappingURL=index.js.map
github godaner / vm-engine / vm-backend / src / main / resources / static / node_modules / antd / lib / select / index.js View on Github external
}
            var modeConfig = {
                multiple: mode === 'multiple' || multiple,
                tags: mode === 'tags' || tags,
                combobox: isCombobox
            };
            return _react2['default'].createElement(_rcSelect2['default'], (0, _extends3['default'])({}, restProps, modeConfig, { prefixCls: prefixCls, className: cls, optionLabelProp: optionLabelProp || 'children', notFoundContent: notFoundContent }));
        }
    }]);
    return Select;
}(_react2['default'].Component);

exports['default'] = Select;

Select.Option = _rcSelect.Option;
Select.OptGroup = _rcSelect.OptGroup;
Select.defaultProps = {
    prefixCls: 'ant-select',
    showSearch: false,
    transitionName: 'slide-up',
    choiceTransitionName: 'zoom'
};
Select.propTypes = SelectPropTypes;
Select.contextTypes = {
    antLocale: _propTypes2['default'].object
};
module.exports = exports['default'];
github godaner / vm-engine / vm-backend / src / main / resources / static / node_modules / antd / lib / auto-complete / index.js View on Github external
}) : [];
            }
            return _react2['default'].createElement(
                _select2['default'],
                (0, _extends3['default'])({}, this.props, { className: cls, mode: 'combobox', optionLabelProp: optionLabelProp, getInputElement: this.getInputElement, notFoundContent: notFoundContent }),
                options
            );
        }
    }]);
    return AutoComplete;
}(_react2['default'].Component);

exports['default'] = AutoComplete;

AutoComplete.Option = _rcSelect.Option;
AutoComplete.OptGroup = _rcSelect.OptGroup;
AutoComplete.defaultProps = {
    prefixCls: 'ant-select',
    transitionName: 'slide-up',
    optionLabelProp: 'children',
    choiceTransitionName: 'zoom',
    showSearch: false,
    filterOption: false
};
module.exports = exports['default'];
github sikidamjanovic / cowrite / node_modules / antd / lib / auto-complete / index.js View on Github external
value: function blur() {
      this.select.blur();
    }
  }, {
    key: "render",
    value: function render() {
      return React.createElement(_configProvider.ConfigConsumer, null, this.renderAutoComplete);
    }
  }]);

  return AutoComplete;
}(React.Component);

exports["default"] = AutoComplete;
AutoComplete.Option = _rcSelect.Option;
AutoComplete.OptGroup = _rcSelect.OptGroup;
AutoComplete.defaultProps = {
  transitionName: 'slide-up',
  optionLabelProp: 'children',
  choiceTransitionName: 'zoom',
  showSearch: false,
  filterOption: false
};
//# sourceMappingURL=index.js.map

rc-select

React Select

MIT
Latest version published 7 days ago

Package Health Score

87 / 100
Full package analysis

Popular rc-select functions