Skip to content

Set custom text in auto complete text #68

Open
@ranshine

Description

@ranshine

I am using this library for loading list which comes from api, whatever text i enter if it is not present in the list it should have use entered text, but if i click on custom text how can i override onSelectItem. By default it is setting when i tap on list item.

onSelectItem={(item) => {
              if (item != null && item.id != null) {
                if (item.id === '1000') {
                   // set some custom data in auto complete text
                } else {
                  const autoItem = { id: item.id, title: item.title ?? '', subtitle: '' }
                  onPressSuggestedBusinessItem(autoItem)
                }
              }
            }}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions