Skip to content

Releases: CodesEasy/CollapseTable.JS

v1.2.0 — Improvements and bug fixes

18 Aug 12:56

Choose a tag to compare

  • New: Runtime mode switch (development/production) + setMode/getMode.
  • New: Programmatic per-row control (expandRow, collapseRow).
  • Improved: Toggle works with multi-class buttons (e.g., Bootstrap).
  • Improved: Accessibility—live region, smarter labels, stable IDs.
  • Improved: More robust observers for header/TBODY changes.
  • Packaging: Updated types/exports; sideEffects:false for better tree-shaking.

Fixes

  • Custom-class toggle not responding.
  • Control column hides when nothing collapses.
  • Hidden-container sizing glitches.
  • colSpan drift after header changes.
  • Full cleanup on destroy() (DOM + listeners).

v1.1.1 — Production-ready release | Bug fix and optimizations

17 Aug 17:47

Choose a tag to compare

Added

  • TypeScript support: bundled .d.ts (src/types/collapsetable.d.ts) covering the full public API.
  • Events & hooks: expand, collapse, toggle, refit, destroy; custom detailsRender(row, hiddenColumns, cells).
  • Programmatic controls: expandRow / collapseRow, plus expandAll / collapseAll.
  • Multi-<tbody> support and stable row IDs.

Fixed (UI)

  • Control (+/−) column no longer leaves a blank first column when nothing is collapsed (it hides entirely).
  • Toggle button visibility and aria state stay in sync as columns hide/unhide.
  • Details panel re-renders correctly after refits/resizes while expanded.

Improved

  • More robust fit algorithm with width hints (data-min) and priorities (data-priority).
  • Safer in hidden containers via deferWhenHidden; uses Resize/Mutation/Intersection observers with fallbacks.
  • Minimal core CSS injected once; table forced to width: 100%, cells left-aligned.

Docs

  • New docs/ site with CDN quick start and a dedicated npm & frameworks guide (npm-usage.html).
  • Polished README and npm_usage.md.

Breaking changes: None.

Install

npm i @codeseasy/collapsetable

CDN (pinned)

<script src="https://cdn.jsdelivr.net/npm/@codeseasy/collapsetable@1.1.1/dist/collapsetable.min.js"></script>

CollapseTable v1.0.0 — Initial Release

18 Aug 13:03

Choose a tag to compare

  • Zero-dependency library to make HTML tables responsive by collapsing lower-priority columns into a per-row details view with a +/− toggle.
  • 📱 Auto fits table to 100% width; headers and cells are left-aligned by default.
  • Accessible: aria-expanded, aria-controls, keyboard support (Enter/Space).
  • 🔧 Simple API: set, unset, refresh, expandAll, collapseAll.
  • 🧠 Smart behavior: honors data-priority, data-min, optional data-label; uses Resize & Mutation observers.
  • 🎛️ Customizable icons/strings/classNames via options; minimal CSS auto-injected.
  • 🌐 UMD build; works in plain HTML or alongside frameworks.
  • 📦 Artifacts: dist/collapsetable.min.js, dist/collapsetable.js, dist/collapsetable.min.js.map.

CDN (jsDelivr):

<script src="https://cdn.jsdelivr.net/gh/CodesEasy/CollapseTable.JS@v1.0.0/dist/collapsetable.min.js"></script>
<script>
  var collapseTable = new CollapseTable();
  collapseTable.set("table1");
</script>

Markup example:

<table id="table1">
  <thead>
    <tr>
      <th data-priority="1" data-min="200">Project</th>
      <th data-priority="2" data-min="160">Client</th>
      <th data-priority="3" data-min="130">Status</th>
      <th data-priority="4" data-min="120">Budget</th>
      <th data-priority="5" data-min="140">Start</th>
      <th data-priority="6" data-min="140">End</th>
    </tr>
  </thead>
  <tbody>
    <tr><td>Website Revamp</td><td>Acme</td><td>Active</td><td>₹2,50,000</td><td>2025-06-01</td><td>2025-09-30</td></tr>
  </tbody>
</table>

Breaking changes: None.