Skip to content

Commit

Permalink
feat: added placeholder for sorting icon, so it does not change width…
Browse files Browse the repository at this point in the history
… when sorting
  • Loading branch information
jelmerveen committed Jul 8, 2024
1 parent 1f5091a commit c50898f
Show file tree
Hide file tree
Showing 15 changed files with 29 additions and 9 deletions.
1 change: 0 additions & 1 deletion dist/flightkit-v0.0.8/flightkit.min.js

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -954,11 +954,17 @@
this.base.addEvent(`#${thId}`, 'click', this.sortData);

const orderProperties = this.orderBy.find(obp => obp.propertyName === header);
const iconElement = document.createElement('span');
if (orderProperties) {
const iconElement = document.createElement('span');
iconElement.innerHTML = orderProperties.direction === 'asc' ? sortAscendingIcon : sortDescendingIcon;
thCell.append(iconElement);
}
else {
iconElement.style.display = 'inline-block';
iconElement.style.width = "24px";
}

thCell.append(iconElement);

headerRow.append(thCell);
}
tableHead.append(headerRow);
Expand Down
1 change: 1 addition & 0 deletions dist/flightkit-v0.0.9/flightkit.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/cdn/ibiss-v0.0.9/avian.min.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/cdn/ibiss-v0.0.9/flightkit.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/cdn/ibiss-v0.0.9/htmx-ibiss-ui.min.js

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

1 change: 1 addition & 0 deletions docs/cdn/ibiss-v0.0.9/rocket.min.js

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

2 changes: 1 addition & 1 deletion docs/js/flightkit.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions documentation/public/cdn/ibiss-v0.0.9/avian.min.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions documentation/public/cdn/ibiss-v0.0.9/flightkit.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions documentation/public/cdn/ibiss-v0.0.9/htmx-ibiss-ui.min.js

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

1 change: 1 addition & 0 deletions documentation/public/cdn/ibiss-v0.0.9/rocket.min.js

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

2 changes: 1 addition & 1 deletion documentation/public/js/flightkit.min.js

Large diffs are not rendered by default.

10 changes: 8 additions & 2 deletions flightkit/components/table.js
Original file line number Diff line number Diff line change
Expand Up @@ -525,11 +525,17 @@ export class FlightkitTable extends HTMLElement {
this.base.addEvent(`#${thId}`, 'click', this.sortData);

const orderProperties = this.orderBy.find(obp => obp.propertyName === header);
const iconElement = document.createElement('span');
if (orderProperties) {
const iconElement = document.createElement('span');
iconElement.innerHTML = orderProperties.direction === 'asc' ? sortAscendingIcon : sortDescendingIcon;
thCell.append(iconElement);
}
else {
iconElement.style.display = 'inline-block';
iconElement.style.width = "24px";
}

thCell.append(iconElement);

headerRow.append(thCell);
}
tableHead.append(headerRow);
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "@pennions/ibiss",
"version": "0.0.8",
"version": "0.0.9",
"avian_version": "0.0.2",
"flightkit_version": "0.0.8",
"flightkit_version": "0.0.9",
"htmx_plugin_version": "0.0.1",
"rocketjs_version": "0.0.1",
"description": "Frontend library of Pennions",
Expand Down

0 comments on commit c50898f

Please sign in to comment.