diff --git a/common/components/search_select.py b/common/components/search_select.py index c2ee25b..c7fe4aa 100644 --- a/common/components/search_select.py +++ b/common/components/search_select.py @@ -9,15 +9,17 @@ This module imports only from ``common.components`` — it has no Django-forms o ``data-*`` attributes wired up by ``ts/search_select.ts`` (compiled to ``games/static/js/dist/search_select.js``). -**Disabling**: this is a composite widget — its ``id`` sits on the wrapper -``
``, which has no ``disabled`` state of its own. To disable it, set -``disabled`` on the inner search ```` (``[data-search-select-search]``); -the wrapper then greys itself via the ``has-[:disabled]:`` utilities in -``_CONTAINER_CLASS``. The inner input is excluded from the global -disabled-input surface (``common/input.css``) so it stays transparent — the -widget reads as one faded element, not a nested box. Callers toggle only the -control's ``disabled`` — never styles. (See ``ts/add_purchase.ts`` gating -``related_game`` on the type field.) +**Field id / label association**: when ``SearchSelect`` is used as a Django form +widget, the field ``id`` (e.g. ``id_related_game``) is placed on the inner +search ```` (``[data-search-select-search]``), making it a real labelable +control. ``