make the bar show auto when need and fix the bug that when update the contentdata but no update the bar attribute