How to add auto suggestions for custom element of properties panel?

Hi,all. I have problem with AutoSuggestTextBoxFactory, i extended my properties panel and added new field for user, i want that it field has auto suggest. Which options entryFactory.autoSuggest is contain?
If anybody have example in code, it will be great.

Hi @Vladimir_Sobko, welcome!

Can you maybe share a few more details in terms of

  • … what do you want to achieve?
  • … what did you already try out?
  • … where do you exactly stuck?

We currently have one type of entries that use this autosuggest text box. This should show-case of what options are needed.

1 Like

I have users in my Store, I created:

function autoSuggestProps(group, element, bpmnFactory, translate){
const userList = store.getState().userList;
if (is(element, 'bpmn:UserTask')) {
    const autoSuggestElement = entryFactory.autoSuggest(translate, {
      id: 'user',
      label: translate('User'),
....

}
group.entries.push(autoSuggestElement);
}

First,
I don`t understand in which option I must put my “userList”.
Second,
Can I use default method show, getItems, canSuggest or must it necessarily override?

Now I am inspecting my elements and my bpp-autosuggest-list is empty.
Sorry, if my questions so simple, but I am beginner in BPMN.
Thanks for help

The code snippet you posted is not formatted correctly. To share code examples that illustrate your problem, please adhere to the following rules:

  • Do not post screenshots of your code
  • Focus your snippets on the few lines that matter for the topic at hand
  • Format your code

Please update your post according to these rules. We may not be able to help you otherwise. In extreme cases we may also close your topic if we regard it as spam.

Hint: To share complete setups, create and link a CodeSandbox. This way, we can inspect the problem at hand in action and, thus, can help you in a timely and more effective manner.

Thanks :heart:

Basically, getItems is expected to return a complete list of strings that might be suggested to the user.