Kaynağa Gözat

Removed old code #13425

Johannes Schill 7 yıl önce
ebeveyn
işleme
779691a072

+ 0 - 21
public/app/core/components/Picker/ValueContainer.tsx

@@ -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;

+ 0 - 53
public/app/core/components/TagFilter/TagOption.tsx

@@ -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>
-//     );
-//   }
-// }