diff --git a/src/components/Dropdown/index.tsx b/src/components/Dropdown/index.tsx index b5bb13c..b86ea20 100644 --- a/src/components/Dropdown/index.tsx +++ b/src/components/Dropdown/index.tsx @@ -253,7 +253,7 @@ const DropdownComponent: ( const index = _.findIndex(listData, (e: any) => _.isEqual(defaultValue, _.get(e, valueField)) ); - if (index > -1 && index <= listData.length - 1) { + if (index > -1 && !_.isEmpty(listData.length) && index <= listData.length - 1) { refList?.current?.scrollToIndex({ index: index, animated: false,