Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove .map function that doesn't work in SSR support #94 #95

Merged
merged 1 commit into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion demo/api.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
Prism.highlightAll();
});
</script>
<script type="module" src="../index.js" data-demo-script="true"></script>
<script type="module" src="./api.min.js" data-demo-script="true"></script>

<!-- If additional elements are needed for the demo, add them here. -->
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-accordion@latest/dist/auro-accordion__bundled.js" type="module"></script>
Expand Down
1 change: 1 addition & 0 deletions demo/api.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import '../index.js';
114 changes: 114 additions & 0 deletions demo/api.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion demo/index.min.js

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

12 changes: 11 additions & 1 deletion rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,14 @@ const indexExamplesConfig = {
}
};

export default [modernConfig, indexExamplesConfig];
const apExamplesConfig = {
input: {
['api.min']: './demo/api.js',
},
output: {
format: 'esm',
dir: 'demo/'
}
};

export default [modernConfig, indexExamplesConfig, apExamplesConfig];
2 changes: 1 addition & 1 deletion src/auro-table.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export class AuroTable extends LitElement {
<table>
<thead>
<tr>
${this.columnHeaders.map((header) => html`
${this.columnHeaders.forEach((header) => html`
jason-capsule42 marked this conversation as resolved.
Show resolved Hide resolved
<th>${header}</th>
`)}
</tr>
Expand Down
8 changes: 5 additions & 3 deletions test/auro-table.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ describe('auro-table', () => {
`);

const table = el.shadowRoot.querySelector('table');
const columns = table.querySelectorAll('th');
const rows = table.querySelectorAll('tr');
jason-capsule42 marked this conversation as resolved.
Show resolved Hide resolved
const columns = rows[1].querySelectorAll('td');

expect(columns.length).to.equal(3);
expect(rows.length).to.equal(3);
Expand All @@ -33,7 +33,8 @@ describe('auro-table', () => {
`);

const table = el.shadowRoot.querySelector('table');
const columns = table.querySelectorAll('th');
const rows = table.querySelectorAll('tr');
const columns = rows[1].querySelectorAll('td');
const details = table.querySelectorAll('td');

expect(columns.length).to.equal(3);
Expand All @@ -50,7 +51,8 @@ describe('auro-table', () => {
`);

const table = el.shadowRoot.querySelector('table');
const columns = table.querySelectorAll('th');
const rows = table.querySelectorAll('tr');
const columns = rows[1].querySelectorAll('td');
const details = table.querySelectorAll('td');

expect(columns.length).to.equal(3);
Expand Down