Removed old code #13425

This commit is contained in:
Johannes Schill 2018-10-10 13:50:56 +02:00
parent ffae3e7a58
commit 779691a072
2 changed files with 0 additions and 74 deletions

View File

@ -1,21 +0,0 @@
import React from 'react';
import { components } from 'react-select';
export const ValueContainer = props => {
const { children, getValue, options } = props;
console.log('getValue', getValue());
console.log('options', options);
const existingValue = getValue();
const selectedOption = options.find(i => (existingValue[0] ? i.id === existingValue[0].id : undefined));
console.log('selectedOption', selectedOption);
return (
<components.ValueContainer {...props}>
{children}
{/* {selectedOption ?
<span>{selectedOption.label}</span>
: children} */}
</components.ValueContainer>
);
};
export default ValueContainer;

View File

@ -20,56 +20,3 @@ export const TagOption = (props: ExtendedOptionProps) => {
};
export default TagOption;
// import React from 'react';
// import { TagBadge } from './TagBadge';
// export interface Props {
// onSelect: any;
// onFocus: any;
// option: any;
// isFocused: any;
// className: any;
// }
// export class TagOption extends React.Component<Props, any> {
// constructor(props) {
// super(props);
// this.handleMouseDown = this.handleMouseDown.bind(this);
// this.handleMouseEnter = this.handleMouseEnter.bind(this);
// this.handleMouseMove = this.handleMouseMove.bind(this);
// }
// handleMouseDown(event) {
// event.preventDefault();
// event.stopPropagation();
// this.props.onSelect(this.props.option, event);
// }
// handleMouseEnter(event) {
// this.props.onFocus(this.props.option, event);
// }
// handleMouseMove(event) {
// if (this.props.isFocused) {
// return;
// }
// this.props.onFocus(this.props.option, event);
// }
// render() {
// const { option, className } = this.props;
// return (
// <button
// onMouseDown={this.handleMouseDown}
// onMouseEnter={this.handleMouseEnter}
// onMouseMove={this.handleMouseMove}
// title={option.title}
// className={`tag-filter-option btn btn-link ${className || ''}`}
// >
// <TagBadge label={option.label} removeIcon={false} count={option.count} onClick={this.handleMouseDown} />
// </button>
// );
// }
// }