Ubuntu 18.04
To enable "Minimize on Click", Open a terminal and run the following command:
gsettings set org.gnome.shell.extensions.dash-to-dock click-action 'minimize'
To change it back to its default function, run this command:
gsettings set org.gnome.shell.extensions.dash-to-dock click-action 'previews'