Added indexOf for datalist widget. Fixed an issue in toggle widget