Skip to content

Commit

Permalink
fix(HierarchyPicker): Scale weights to equal 1 (#354)
Browse files Browse the repository at this point in the history
  • Loading branch information
Austin Piel authored Apr 9, 2020
1 parent 5946017 commit 299dd9a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/core/src/components/HierarchyPicker/Search/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ type FuseKey = { name: keyof SearchItemShape; weight: number };
const defaultFuseKeys: FuseKey[] = [
{
name: 'label',
weight: 0.8,
weight: 0.35,
},
{
name: 'keywords',
weight: 0.7,
weight: 0.3,
},
{
name: 'description',
weight: 0.5,
weight: 0.25,
},
];

Expand Down Expand Up @@ -107,7 +107,7 @@ export class Search extends React.Component<SearchProps & WithStylesProps> {
if (this.props.indexParentPath) {
fuseKeys.push({
name: 'formattedParents',
weight: 0.2,
weight: 0.1,
});
}

Expand Down

0 comments on commit 299dd9a

Please sign in to comment.