Skip to content

Commit

Permalink
Merge pull request #424 from mbeps/development
Browse files Browse the repository at this point in the history
BUG FIX: Minimise skill button not being shown when skills table expanded
  • Loading branch information
mbeps authored Jul 31, 2024
2 parents 1550a27 + 9864b12 commit 15ab5e1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions components/Skills/CategorySkillDisplay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ const CategorySkillDisplay: React.FC<CategorySkillDisplayProps> = ({
let skillCount: number = 0;
let groupCount: number = 0;

function filterSkills(skills: SkillDatabaseKeys[], onlyMain: boolean) {
function filterSkills(
skills: SkillDatabaseKeys[],
onlyMain: boolean
): SkillDatabaseKeys[] {
return skills.filter((skillKey) =>
onlyMain ? skillDatabaseMap[skillKey]?.isMainSkill : true
);
Expand Down Expand Up @@ -98,7 +101,7 @@ const CategorySkillDisplay: React.FC<CategorySkillDisplayProps> = ({
);

const shouldShowToggleButton: boolean =
displayedMainSkillsCount < totalMainSkillsCount;
showAll || displayedMainSkillsCount < totalMainSkillsCount;

function toggleShowAll(): void {
setShowAll(!showAll);
Expand Down

0 comments on commit 15ab5e1

Please sign in to comment.