diff --git a/components/raids/RaidCombobox/index.tsx b/components/raids/RaidCombobox/index.tsx index 86b73e42..095bc249 100644 --- a/components/raids/RaidCombobox/index.tsx +++ b/components/raids/RaidCombobox/index.tsx @@ -84,6 +84,9 @@ const RaidCombobox = (props: Props) => { const [currentRaid, setCurrentRaid] = useState() const [tabIndex, setTabIndex] = useState(NUM_ELEMENTS + 1) + // Data + const [farmingRaid, setFarmingRaid] = useState() + // Refs const listRef = createRef() const inputRef = createRef() @@ -203,6 +206,8 @@ const RaidCombobox = (props: Props) => { if (group.section > 0) sections[group.section - 1].push(group) }) + setFarmingRaid(groups[0].raids[0]) + setSections(sections) }, [setSections] @@ -322,22 +327,25 @@ const RaidCombobox = (props: Props) => { // Render the ungrouped raid group function renderUngroupedRaids() { - // Render the Untitled group with the allRaids inside of it first if the option is enabled - if (props.showAllRaidsOption) { - const ungroupedRaids = generateRaidItems([allRaidsOption]) + let ungroupedRaids = farmingRaid ? [farmingRaid] : [] - return ( - - {ungroupedRaids} - - ) + if (props.showAllRaidsOption) { + ungroupedRaids.push(allRaidsOption) } + + const options = generateRaidItems(ungroupedRaids) + + return ( + + {options} + + ) } // Generates a list of RaidItem components from the specified raids