Skip to content

Commit

Permalink
Data table WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
adamlaki committed Nov 1, 2023
1 parent c1f7a57 commit 655644e
Show file tree
Hide file tree
Showing 13 changed files with 4,456 additions and 100 deletions.
12 changes: 5 additions & 7 deletions dist/categories/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4,375 changes: 4,374 additions & 1 deletion dist/css/main.css

Large diffs are not rendered by default.

12 changes: 5 additions & 7 deletions dist/customers/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 5 additions & 7 deletions dist/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 24 additions & 13 deletions dist/js/data-table.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions dist/js/data.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 5 additions & 7 deletions dist/orders/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 5 additions & 7 deletions dist/products/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions src/_includes/partial/card/data-table.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@ <h2 class="app-card__title">{{ dataTable.title }}</h2>
class="alert alert--info data-table-alert"
x-show="selectedItems.length"
>
<span x-text="`${selectedItems.length} items are selected`"></span>
<span x-text="`${selectedItems.length > total ? total : selectedItems.length} items are selected`"></span>
<div class="data-table-alert__actions">
<div class="data-table-alert__column">
<button
@click="selectAllCheckbox($event);"
class="btn btn--primary btn--sm"
x-text="`Select all ${items.length}`"
x-text="`Select all ${items.length > total ? total : items.length}`"
></button>
<button
@click="deselectAllCheckbox($event);"
Expand Down Expand Up @@ -146,13 +146,14 @@ <h2 class="app-card__title">{{ dataTable.title }}</h2>
<template x-for="(item, index) in pagedItems" :key="item.id">
<tr>
<td>
<label class="form-check" :aria-label=`Select ${item.name}`>
<label class="form-check" :aria-label="`Select ${item.name}`">
<input
:name="item.id"
class="form-check__control"
type="checkbox"
value="1"
x-model="item.selected"
:change="updateSelectAllStatus()"
/>
</label>
</td>
Expand Down
30 changes: 0 additions & 30 deletions src/_includes/partial/pagination.html

This file was deleted.

2 changes: 1 addition & 1 deletion src/css/main.css

Large diffs are not rendered by default.

Loading

0 comments on commit 655644e

Please sign in to comment.