Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

Commit

Permalink
revert(component): fix(component): fix pattern list search, convert p…
Browse files Browse the repository at this point in the history
…attern name to lowercase (#102)
  • Loading branch information
Alexpeschel authored and tilmx committed Dec 20, 2017
1 parent 6f6cac1 commit 867e8d0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/component/container/pattern_list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export class PatternListContainer extends React.Component<PatternListContainerPr
const result: PatternListContainerItemProps[] = [];

listItem.map(item => {
if (item.value.indexOf(term.toLowerCase()) !== -1 && !item.children) {
if (item.value.toLowerCase().indexOf(term.toLowerCase()) !== -1 && !item.children) {
result.push(item);
} else if (item.children) {
const folder = { value: item.value, children: [] };
Expand Down Expand Up @@ -77,7 +77,7 @@ export class PatternListContainer extends React.Component<PatternListContainerPr

folder.getPatterns().forEach((pattern: Pattern) => {
result.push({
value: pattern.getId(),
value: pattern.getName(),
draggable: true,
icon: pattern.getIconPath(),
handleDragStart: (e: React.DragEvent<HTMLElement>) => {
Expand Down

0 comments on commit 867e8d0

Please sign in to comment.