In the map view, right-click on the Legend to open the Properties window, then click the "Items" tab. Under "Map Extent Options", select "Only show classes that are visible in the current map extent".
It'll refresh as you move around the map or toggle on/off classes within the layer.