Maxperson
Morkus from Orkus
If the elves have stopped attacking and have disengaged from the melee in order to hide, I would generally say that combat has ended. Now while I admit that the ability as conceived in Chainmail allows elves to hide in a combat situation that encompasses multiple melees, in D&D a combat encounter is generally limited to one melee, so that's how I figured other posters have been using the phrase "in combat". Personally, I don't find it very useful to determine whether the elf can use the ability "in combat" or not.
First, combat is still going. This disengage and end combat idea is moving the goalposts and not even correct. The elf can be 6 inches from the enemy and if in natural surroundings, can disappear while being attacked. That means combat is still going on. Second, even if the elf disengages and moves 10 feet away, the attacker can throw, shoot, cast spells at, etc. the elf by guessing a location, so even then combat is still going on. Third, the whole combat vs. non-combat thing is entirely irrelevant to the point. The point is that the elf is vanishing from view while being observed in 1e and 2e, which is entirely consistent with the 5e Sage Advice.