Fix collapse bug introduced by the size change fix

Adding a test and a minimal solution to the collapse feature that was broken in #26. While this solution solves the issue here, it seems kind of backwards. I think that the token field needs to keep track of the collapsed state so that reloading data while the field is collapsed keeps the field collapsed. However this is a potential API breaker as some users may be depending on the fact that refreshing data uncollapses the field. 

Could we get @ayanonagon to weigh in on what the right solution is here? I'd be happy to make the fix if we determine it's the right choice.