add maxHeight option when autoHeight = true