The htmx.config.morphScanLimit option limits how many sibling elements htmx will scan when trying to match nodes during a morph swap. Higher values improve accuracy for long lists without IDs at the cost of performance.
Default: 10
Example
htmx.config.morphScanLimit = 20;
<meta name="htmx-config" content='{"morphScanLimit":20}'>
If morphing produces unexpected reorders in long lists, try increasing this limit.
See also: htmx.config