Replace Log Material item dropdown with searchable combobox
Inventory lists grow over time; a plain <select> becomes unusable. The new combobox filters as you type, supports keyboard navigation (Arrow/Enter/Escape), and shows current stock on selection — matching the pattern used by the powder picker in the item wizard. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1105,9 +1105,22 @@
|
||||
<div class="modal-body">
|
||||
<div class="mb-3">
|
||||
<label class="form-label fw-semibold">Inventory Item <span class="text-danger">*</span></label>
|
||||
<select id="lmInventoryItem" class="form-select">
|
||||
<option value="">-- Select item --</option>
|
||||
</select>
|
||||
<div class="position-relative">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" id="lmItemSearch"
|
||||
placeholder="Search by name or unit…" autocomplete="off"
|
||||
oninput="lmComboInput()"
|
||||
onfocus="lmComboOpen()"
|
||||
onkeydown="lmComboKey(event)">
|
||||
<button class="btn btn-outline-secondary" type="button" tabindex="-1"
|
||||
id="lmItemDropdownToggle" onclick="lmComboToggle()">
|
||||
<i class="bi bi-chevron-down" style="font-size:.75rem;"></i>
|
||||
</button>
|
||||
</div>
|
||||
<div id="lmItemDropdown"
|
||||
style="display:none;max-height:220px;overflow-y:auto;z-index:1070;background:#fff;border:1px solid rgba(0,0,0,.15);border-radius:.375rem;box-shadow:0 4px 12px rgba(0,0,0,.12);">
|
||||
</div>
|
||||
</div>
|
||||
<div id="lmItemBalance" class="form-text text-muted d-none"></div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
|
||||
Reference in New Issue
Block a user