View insertion via mini-pager fails when embedded via viewsreference

Created on 5 October 2024, about 1 month ago

Problem/Motivation

The new htmx powered mini-pager works fine on it's own page. I'm sure I also tested it when it was embedded as the only view on a page. It does not insert properly when there are two such views.

Steps to reproduce

Embed 2 views with htmx-mini-pager on a page. Page ahead. Incoming view content is placed as a sibling to the exisiting view rather than replacing.

Proposed resolution

Remaining tasks

An initial finding is that the target property assumes there is only one target:

$htmxNext->get($nextUrl)
      ->select('div.views-element-container')
      ->target('div.views-element-container')
      ->swap('innerHTML show:top');

It seems that closest should resolve this but it a quick trial it did not.

<?php
$htmxNext->get($nextUrl)
      ->select('div.views-element-container')
      ->target('closest div.views-element-container')
      ->swap('outerHTML show:top');

?>

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Active

Version

1.3

Component

Drupal Code

Created by

πŸ‡ΊπŸ‡ΈUnited States fathershawn New York

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024