The onSubmit function typing in the SearchBox component was changed from handling a string to handling a generic T type object. Also, the onSubmit function now uses the found item in components based on the selected suggestion to submit instead of submitting directly.