i just tried setting states it didnt work unless i set a condition for when state was true/false to do the 100% resize thing.
Its a bit hacky but should be able to achieve what you want.