saving min and max height on click of save