hidden and collapsed flags are sent to js only if set