Fix broken Quick Assign dropdown (#102)
quickAssign() wired lt.combobox.init() with an onSelect callback, but combobox only supports the multi-select onChange(selected[]) contract — onSelect is never invoked, so _quickAssignUserId stayed undefined no matter what the user picked and Quick Assign always showed "Please select a user from the list." Switched to lt.typeahead.init(), which does support onSelect, matching the already-working Bulk Assign modal. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MGDKHiU5RJdo3dqQUDow3X
This commit is contained in:
@@ -1139,12 +1139,11 @@ function quickAssign(ticketId) {
|
||||
<div class="lt-modal-body">
|
||||
<p class="lt-mb-xs lt-text-muted lt-text-xs">Ticket #${lt.escHtml(String(ticketId))}</p>
|
||||
<label class="lt-label">Assign to:</label>
|
||||
<div class="lt-combobox" id="quickAssignCombobox">
|
||||
<div class="lt-combobox-input-wrap">
|
||||
<input type="text" class="lt-combobox-input" id="quickAssignInput"
|
||||
placeholder="Search users…" autocomplete="off" aria-label="Search users">
|
||||
</div>
|
||||
<ul class="lt-combobox-list" role="listbox" aria-hidden="true"></ul>
|
||||
<div class="lt-typeahead" id="quickAssignTypeahead" style="position:relative">
|
||||
<input type="text" class="lt-input lt-w-full" id="quickAssignInput"
|
||||
placeholder="Search users…" autocomplete="off" spellcheck="false"
|
||||
aria-label="Search users" aria-autocomplete="list">
|
||||
<div class="lt-typeahead-dropdown" id="quickAssignDropdown"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="lt-modal-footer">
|
||||
@@ -1170,7 +1169,9 @@ function quickAssign(ticketId) {
|
||||
label: u.display_name || u.username
|
||||
}))
|
||||
];
|
||||
lt.combobox.init(input, items, {
|
||||
lt.typeahead.init(input, items, {
|
||||
minChars: 1,
|
||||
maxResults: 8,
|
||||
onSelect: function(item) { _quickAssignUserId = item.value || null; }
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user