@@ -267,6 +267,7 @@ export const LookupSearch: FC<LookupSearchProps> = (props) => {
267267 'slds-input-has-icon' ,
268268 `slds-input-has-icon_${ iconAlign } ` ,
269269 { 'slds-hide' : hidden } ,
270+ scopes != null ? 'slds-col' : undefined ,
270271 className
271272 ) ;
272273 const searchInput = (
@@ -276,7 +277,7 @@ export const LookupSearch: FC<LookupSearchProps> = (props) => {
276277 >
277278 < Input
278279 { ...rprops }
279- className = { scopes != null ? 'slds-col' : undefined }
280+ disabled = { disabled }
280281 bare = { scopes != null }
281282 inputRef = { inputRef }
282283 value = { searchText }
@@ -650,7 +651,7 @@ export const Lookup = createFC(
650651 elementRef,
651652 selectionRef : selectionRef_ ,
652653 candidateListRef : candidateListRef_ ,
653- ...searchProps
654+ ...rprops
654655 } = props ;
655656
656657 const id = useFormElementId ( id_ , 'lookup' ) ;
@@ -769,6 +770,8 @@ export const Lookup = createFC(
769770 ) ;
770771 } ) ;
771772
773+ const onSearch = useEventCallback ( ( ) => onLookupRequest ( searchText || '' ) ) ;
774+
772775 const onBlur = useEventCallback ( ( ) => {
773776 setTimeout ( ( ) => {
774777 if ( ! isFocusedInComponent ( ) ) {
@@ -804,16 +807,17 @@ export const Lookup = createFC(
804807 />
805808 ) : (
806809 < LookupSearch
807- { ...searchProps }
810+ { ...rprops }
808811 id = { id }
809812 lookupSearchRef = { searchRef }
810813 searchText = { searchText }
814+ scopes = { scopes }
811815 targetScope = { targetScope }
812816 onScopeMenuClick = { onScopeMenuClick }
813817 onScopeSelect = { onScopeSelect }
814818 onSearchTextChange = { onSearchTextChange }
815- onSubmit = { ( ) => onLookupRequest ( searchText || '' ) }
816- onPressDown = { onFocusFirstCandidate . bind ( this ) }
819+ onSubmit = { onSearch }
820+ onPressDown = { onFocusFirstCandidate }
817821 onComplete = { onComplete }
818822 onBlur = { onBlur }
819823 />
0 commit comments