Allow using this macro for select2 as search field 

Hi, I added a small modification to allow using the macro for select2 when a min_length option is set (i.e. using it as a search field especially for ajax data load).