Scientist Steven Wiederman from the University of Aukland (shown in image below) has recently published his work suggesting that dragonflies have the ability to focus on a target while blocking out other useless visual information. This is known as selective attention and his work is the first to demonstrate this ability in neurons from an invertebrate.
Image Credit: David O'Carroll, University of Adelaide
Wiederman SA, O'Carroll DC. Selective attention in an insect visual neuron. Current Biology doi:10.1016/j.cub.2012.11.048
I'd like to question your use of "first" here. A Google Scholar search for "selective attention octopus" (my own obvious choice for a candidate) turned up two relevant articles, one from 1978 and one from 1965, on the first page of results. A result on the second page from 2004 implies (but doesn't conclude) that fruit flies demonstrate behaviour "consistent with" selective attention.
The fact that invertebrates, in general, demonstrate so-called "advanced" cognitive abilities is always important to report. It helps to remind us that tems like "higher animals" are more generally untrue, and that the underlying systems which support our own behaviours don't have to be as big and complex as we are, nor did they need a particularly long time to evolve.