@htmlbricks/hb-table 0.68.7 → 0.68.9
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/README.md +2 -2
- package/main.iife.js +64 -10
- package/main.iife.js.map +1 -1
- package/manifest.json +12 -8
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -61,7 +61,7 @@ Use **`actions`** for a column of buttons that is the same for every row (one se
|
|
|
61
61
|
|
|
62
62
|
### Add button (`add_item`)
|
|
63
63
|
|
|
64
|
-
Set **`add_item`** to `"yes"` / `"true"` (or boolean `true` in frameworks) to show
|
|
64
|
+
Set **`add_item`** to `"yes"` / `"true"` (or boolean `true` in frameworks) to show an **Add** control in the toolbar below the table (`part="table-actions"`): it is placed **right after the multi-select settings (gear) button** when **`selectactions`** is set; if there is no gear, it is the first control in that strip. Toolbar controls use the same Bulma **`pagination-link`** styling as **`hb-paginate`** (including **`is-current`** on the gear when multi-select mode is on). It is meant to let the user start creating a **new row**; the table does not insert data by itself.
|
|
65
65
|
|
|
66
66
|
- **Visibility:** the button is rendered only when **`enableselect`** is *not* active (multi-select gear mode hides it).
|
|
67
67
|
- **Click:** dispatches the **`addItem`** custom event with payload **`{ id }`**, where **`id`** is the table’s own **`id`** attribute (empty string if unset). The host should listen for `addItem` and open a form, navigate to a create page, call an API, etc.
|
|
@@ -101,7 +101,7 @@ Set **`add_item`** to `"yes"` / `"true"` (or boolean `true` in frameworks) to sh
|
|
|
101
101
|
|
|
102
102
|
- **Slots:** `add-button-content` (Add button body), `buttons-container` (extra toolbar content).
|
|
103
103
|
- **CSS parts:** `table`, `table-actions`, `selected-row`, `common-row`.
|
|
104
|
-
- **Toolbar:** multi-select **
|
|
104
|
+
- **Toolbar order:** **settings** (gear) → **Add** (when `add_item` and not in multi-select mode) → bulk **select actions** (when enabled) → **`buttons-container`** slot → **`hb-paginate`** (inline-end). The first **`nav.pagination.is-small`** group uses **`margin-inline-start`** from **`--hb-table-toolbar-settings-margin-inline-start`** (default `--bulma-block-spacing`). Optional **`--hb-paginate-list-gap`** on the host also applies between toolbar **`pagination-link`** items, matching **`hb-paginate`**.
|
|
105
105
|
- **i18n:** Italian and English in docs metadata; set `i18nlang` accordingly.
|
|
106
106
|
- **`hb-paginate`:** embedded when pagination is enabled; while **`is_loading`**, it stays in the DOM (hidden) under the skeleton overlay so props stay aligned — user interaction is blocked until loading ends.
|
|
107
107
|
- **Pagination while loading:** `is_loading` does not recalculate `page` / `pages` by itself. With **client-side** pagination, if you clear `rows` during a refresh, the `$effect` that derives `pages` from row count does not run on an empty list, so **`pages` can stay at the previous value** until new rows arrive — keep `page`, `pages`, and `total` aligned with your API if needed.
|