The bank-account filter rendered "Please select a client" even when a
client was set on the rule. Two causes:
- Inside (fc/with-field :transaction-rule/bank-account ...) the cursor is
rebound to the bank-account field, so (:transaction-rule/client
(fc/field-value)) read the nil bank-account value and the server
rendered the placeholder. The clientId watcher only fires on change, so
when editing (client preset, unchanged) the htmx swap never corrected
it. Read the client from the form root before entering the field.
- The clientId-change swap used innerHTML, nesting a fresh typeahead
inside the stale one and breaking its Alpine refs. Use outerHTML so the
typeahead is replaced in place.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>