The "+" button for adding SearchFilterPreset doesn't work and arise error.

Justus

Member
Unity 2020.3.24LTS
UIS 1.2.7

Steps:
1. Import UIS to an empty project.
2. click the 'Item Categories' tab in "Inventory Manager"
3. click the plus button "+" for adding Search Filter Preset
4. nothing happen and an error message emerges, check the attached snapshot for message details.
```
NullReferenceException: Object reference not set to an instance of an object
Opsive.UltimateInventorySystem.Editor.VisualElements.SearchableList`1[T].<.ctor>b__28_1 () (at Assets/Opsive/UltimateInventorySystem/Editor/VisualElements/SearchableList.cs:128)
UnityEngine.UIElements.Clickable.Invoke (UnityEngine.UIElements.EventBase evt) (at <4c8a9874288b4fb78fa7fdbcd8065b00>:0)
UnityEngine.UIElements.Clickable.ProcessUpEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.Vector2 localPosition, System.Int32 pointerId) (at <4c8a9874288b4fb78fa7fdbcd8065b00>:0)
UnityEngine.UIElements.Clickable.OnMouseUp (UnityEngine.UIElements.MouseUpEvent evt) (at <4c8a9874288b4fb78fa7fdbcd8065b00>:0)
UnityEngine.UIElements.EventCallbackFunctor`1[TEventType].Invoke (UnityEngine.UIElements.EventBase evt) (at <4c8a9874288b4fb78fa7fdbcd8065b00>:0)
UnityEngine.UIElements.EventCallbackRegistry.InvokeCallbacks (UnityEngine.UIElements.EventBase evt) (at <4c8a9874288b4fb78fa7fdbcd8065b00>:0)
UnityEngine.UIElements.CallbackEventHandler.HandleEvent (UnityEngine.UIElements.EventBase evt) (at <4c8a9874288b4fb78fa7fdbcd8065b00>:0)
UnityEngine.UIElements.CallbackEventHandler.HandleEventAtTargetPhase (UnityEngine.UIElements.EventBase evt) (at <4c8a9874288b4fb78fa7fdbcd8065b00>:0)
UnityEngine.UIElements.MouseCaptureDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <4c8a9874288b4fb78fa7fdbcd8065b00>:0)
UnityEngine.UIElements.EventDispatcher.ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, System.Boolean imguiEventIsInitiallyUsed) (at <4c8a9874288b4fb78fa7fdbcd8065b00>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <4c8a9874288b4fb78fa7fdbcd8065b00>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEventQueue () (at <4c8a9874288b4fb78fa7fdbcd8065b00>:0)
UnityEngine.UIElements.EventDispatcher.OpenGate () (at <4c8a9874288b4fb78fa7fdbcd8065b00>:0)
UnityEngine.UIElements.EventDispatcherGate.Dispose () (at <4c8a9874288b4fb78fa7fdbcd8065b00>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <4c8a9874288b4fb78fa7fdbcd8065b00>:0)
UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at <4c8a9874288b4fb78fa7fdbcd8065b00>:0)
UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at <4c8a9874288b4fb78fa7fdbcd8065b00>:0)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <4c8a9874288b4fb78fa7fdbcd8065b00>:0)
UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at <4c8a9874288b4fb78fa7fdbcd8065b00>:0)
UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <4c8a9874288b4fb78fa7fdbcd8065b00>:0)
UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at <4c8a9874288b4fb78fa7fdbcd8065b00>:0)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at <53902087bc8645c2b76c7b23d6928f19>:0)
```

Snapshot
1650354121852.png
 
Thank you for the bug report.
Unfortunatly I was unable to reproduce the error using UIS 1.2.7 and Unity 2020.3.15f. So it is hard to say if the change I made will really fix the issue.

Checking the code the only thing I see that could have happened is that the searchbar string value was null. So I added a null check just in case to make sure this never happens again.

Could you try to write something in the searchbar before pressing the '+' button just to make sure that is it and not something else?
 
Get stable reproduce steps for this issue:
1. select any category in `Item Categories`, here we select `Weapons`
2. Click `Ancestors` tab of `Weapons`, and click the icon of any of its ancestors, here we click the `Hotbar Item`
3. then the selection will jump to `Hotbar Item` automatically
4. click the ‘+’ button now, the error will emergence.
 
Top