@optionfactory/fml 9.0.0-rc34 → 9.0.0-rc35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/ful.mjs CHANGED
@@ -5759,9 +5759,13 @@ class Table extends ParsedElement {
5759
5759
  // a table that loaded while it was not laid out, in a tab not yet shown for one, has
5760
5760
  // measured nothing: with a first page shorter than its panel no scroll would ever come
5761
5761
  // to do it. Its box changing size is the moment it is laid out, or shows more rows.
5762
+ // A frame later: rows added while the sizes are being reported resize the header, which
5763
+ // is observed too, and the browser reports that as a resize loop.
5762
5764
  new ResizeObserver(() => {
5763
- this.#countInView();
5764
- this.#reconcile(false);
5765
+ requestAnimationFrame(() => {
5766
+ this.#countInView();
5767
+ this.#reconcile(false);
5768
+ });
5765
5769
  }).observe(tableWrapper);
5766
5770
  } else if (status) {
5767
5771
  this.#endWatch = new IntersectionObserver((entries) => {
@@ -5773,6 +5777,11 @@ class Table extends ParsedElement {
5773
5777
  }
5774
5778
  const thead = /** @type HTMLTableSectionElement */ (this.querySelector('thead'));
5775
5779
  schema.headersTemplate.renderTo(thead);
5780
+ // the stylesheet starts the scrollbar of a filling table under its header, which it can
5781
+ // only do knowing how tall the header is: a title wrapping onto a second line changes it
5782
+ new ResizeObserver(() => {
5783
+ tableWrapper.style.setProperty('--ful-table-header-height', `${thead.getBoundingClientRect().height}px`);
5784
+ }).observe(thead);
5776
5785
  this.#sorters = thead.querySelectorAll('ful-sorter');
5777
5786
  await Rendering.waitForChildren(this);
5778
5787