Add not found item to list as new entry

I have seen various methods of adding a not found item to the list.

I would like to know how I can do it in a Datatables plug-in, so that it applies to all instances of select2.

Thanks!