Fix action button should be hidden when action attr is removed