sickdyd/react-search-autocomplete

Warning Error for Key Undefined

Closed this issue · 2 comments

Getting warning in the console for key to be undefined.

image

<ReactSearchAutocomplete
                items={items}
                fuseOptions={{
                  keys: ['name'],
                  threshold: 0.2,
                  ignoreLocation: true,
                  findAllMatches: true,
                  includeMatches: true,
                }}
                resultStringKeyName="message"
                onSelect={handleOnSelect}
                onClear={handleOnClear}
                autoFocus
                showIcon={false}
                placeholder="Search"
              />

please how did you solve this @djaffer

@Louis-Ramsey do a filter on items to ensure no undefined values are there before being sent as props.