How do I pre-populate the chips on a BitDropdown? #9346
Unanswered
artinzamani
asked this question in
Q&A
Replies: 1 comment 1 reply
-
@artinzamani Thanks for contacting us. I've reviewed the source code you provided and couldn't find anything wrong with it. Could you please create a working sample so I can review it further? A GitHub repo is the best format for these types of reviews. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everyone.
I have a created a component based on
BitDropdown
.It is basically an input for assigning users to a role. The input is
Virtualize
d and is set to show the items asChip
s. The user can search the user repository using an ItemsProvider, and optionally add users to this input.It works perfect when I'm creating a new role, which is to say when starting from an empty user list. The new items get added (or removed) without any problem.
However, when I try to open an existing role with existing users, the chips for the existing items doesn't show up in the input, even though they exist in the
Values
collection.I took a look at the source code, and I'm guessing the problem is that the existing
Values
are not in the _selectedItems, but I found no way of externally adding existing items to that collection.Here's the partial snippet of my component:
Any ideas what I can do to fix this?
Any help would be greatly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions