Posted 14 July 2025, 2:54 am EST - Updated 14 July 2025, 3:44 am EST
Hi Team,
We are using the Wijmo wj-combo-box component and need help implementing the following three use cases. Screenshots for each use case are attached for reference.
Use Case 1: Read-Only Default Selection Without Cross Button
- The dropdown should display a default selected item (e.g., “Televisions”) as shown in Screenshot 1.
2.This item should not be selectable again from the dropdown.
3.It should not show a cross (delete) button in the selected box, but it can be deleted from the dropdown list. - Currently, our implementation allows the user to re-select this item, which we want to prevent.
Use Case 2: Auto-Select Next Item Without Cross Button
1.When the default item (“Televisions”) is deleted, the next item (“Category 1”) is automatically selected — this part is working correctly in our implementation.
2.However, as shown in Screenshot 2, we want “Category 1” to appear in the select box without a cross (delete) button once it becomes the selected item. Currently, in our implementation, “Category 1” is selected with a cross button, which we want to avoid.
3.The dropdown list itself should still display the cross button next to items for deletion purposes — this behavior is desired and should remain unchanged.
Use Case 3: Restrict Selection to Default Only
1.The user should not be able to select any other item apart from the default one.
2.As shown in Screenshot 3, “Unassigned” is selected, and the dropdown shows other options, but the user should not be able to manually select them.
3.The dropdown should allow deletion of the default item, but not allow selecting any other item manually.
Request:
Could you please guide us on how to:
1.Prevent re-selection of the default item.
2.Ensure auto-selection of the next item without showing the cross button.
3.Restrict manual selection to only the default item and allow deletion only.
Any code samples from stack blitz in angular would be greatly appreciated.
HTML Code
<wj-combo-box #cmbCategory
[itemsSource]="selectedCategory"
[selectedValue]="selectedCategoryValue"
(gotFocus)="dropdownVisible = true"
(lostFocus)="dropdownVisible = false"
(selectedValueChanged)="onCategoryValueChanged($event)"
(selectedIndexChanged)="onCategoryChanged(cmbCategory.selectedItem)"
[selectedValuePath]="'id'"
[displayMemberPath]="'categoryName'"
[isDisabled]="false"
[isEditable]="false"
[isRequired]="false"
[dropDownCssClass]="searchType != type.New ? 'mapped-category-dropdown' : ''">
Please find the screenshot as below
Use case 1
Use case 2
Use case 3