Skip to content

Commit

Permalink
fixed linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
BabyElias committed Jun 3, 2024
1 parent 2784a07 commit 058e4c8
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 31 deletions.
48 changes: 24 additions & 24 deletions docs/pages/playground.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
]"
/> -->
<KTable :headers="tableHeaders" :rows="tableRows" caption="User Information Table" />


<!-- Play around with your component here: -->

Expand All @@ -34,33 +34,33 @@
<script>
/*
Playground is a Vue component too,
so you can also use `data`, `methods`, etc.
as usual if helpful
*/
import KTable from '../../lib/KTable/KTable.vue';
Playground is a Vue component too,
so you can also use `data`, `methods`, etc.
as usual if helpful
*/
import KTable from '../../lib/KTable/KTable.vue';
export default {
name: 'Playground',
components: {
KTable,
},
data() {
return {
tableHeaders: [
{ label: 'Name', dataType: 'string' },
{ label: 'Age', dataType: 'numeric' },
{ label: 'Birth Date', dataType: 'date' },
{ label: 'City', dataType: 'string' },
{ label: 'Misc', dataType: 'others' },
],
tableRows: [
['Alice', 25, '1999-05-12', 'New York', 'Example'],
['Bob', 30, '1994-02-22', 'San Francisco', 'Example'],
['Charlie', 35, '1989-12-15', 'Chicago', 'Example'],
],
};
},
KTable,
},
data() {
return {
tableHeaders: [
{ label: 'Name', dataType: 'string' },
{ label: 'Age', dataType: 'numeric' },
{ label: 'Birth Date', dataType: 'date' },
{ label: 'City', dataType: 'string' },
{ label: 'Misc', dataType: 'others' },
],
tableRows: [
['Alice', 25, '1999-05-12', 'New York', 'Example'],
['Bob', 30, '1994-02-22', 'San Francisco', 'Example'],
['Charlie', 35, '1989-12-15', 'Chicago', 'Example'],
],
};
},
};
</script>
7 changes: 0 additions & 7 deletions lib/KTable/KTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,6 @@
headers: {
type: Array,
required: true,
validator: function(value) {
return value.every(
header =>
['label', 'dataType'].every(key => key in header) &&
['string', 'numeric', 'date', 'others'].includes(header.dataType)
);
},
},
rows: {
type: Array,
Expand Down
4 changes: 4 additions & 0 deletions lib/KTable/KTableGridItem.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
<template>

<td :style="{ textAlign: align }" tabindex="0" @keydown="onKeydown">
{{ content }}
</td>

</template>


<script>
export default {
name: 'KTableGridItem',
props: {
Expand All @@ -32,6 +35,7 @@
},
},
};
</script>


Expand Down

0 comments on commit 058e4c8

Please sign in to comment.