     func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
         delegate?.pickerView?(self, willSelectItem: indexPath.item)
         collectionView.scrollToItem(at: indexPath, at: .centeredHorizontally, animated: true)
-        var reloadInexdes: [IndexPath] = []
-        if showAllItem {
-            reloadInexdes = indexPath != lastSelectedIndex ? [lastSelectedIndex, indexPath]: [indexPath]
+        var reloadIndexes: [IndexPath] = []
+        if !showAllItem {
+            reloadIndexes = collectionView.visibleIndexPath
+        } else if indexPath != lastSelectedIndex {
+              reloadIndexes = [lastSelectedIndex, indexPath]
         } else {
-            reloadInexdes = collectionView.visibleIndexPath
+            reloadIndexes = [indexPath]
         }
         lastSelectedIndex = indexPath
-        pickerCollectionView.reloadItems(at:reloadInexdes)
+        pickerCollectionView.reloadItems(at:reloadIndexes)
         delegate?.pickerView?(self, didSelectItem: indexPath.item)
     }
     

    /// Calculate item width along with scale padding
    fileprivate var cellWidth: CGFloat {
        if showAllItem {
            return   pickerCollectionView.bounds.width/CGFloat(itemCount)
        }
        return max(pickerCollectionView.bounds.width - (titlePadding*2), 0)
    }

    
    /// Set to manupate and configure data set for pikcer view
    weak var dataSource: MBPickerViewDataSource? {
        didSet { reloadData() }
    }
    
    /// Reload data, it will call all the data source
