createConfig
Creates a configuration object for a
<Table>
or<MiniTable>
.
Usage
vue
<script setup lang="ts">
import { Table, createConfig } from '@screaming/tables'
const config = createConfig({
backups: { DEFAULT: ... },
semantic: ...,
tieRanks: ...,
ignore: [...]
})
</script>
<template>
<!-- other props omitted for brevity -->
<Table :config="config" />
</template>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Type Definitions
ts
interface Backups {
DEFAULT: string
[key: string]: string
}
interface Config {
backups: Backups
semantic: boolean
tieRanks: boolean
ignore: (string | number | boolean)[]
}
interface CreateConfigOptions {
backups: Backups
semantic?: boolean
tieRanks?: boolean
ignore?: (string | number | boolean)[]
}
/**
* @param options - Function options.
* @param options.backups - Mapping of keys to which keys they use to resolve tied data.
* @param options.semantic - If the HTML elements should be table elements or not
* @param options.tieRanks - If ranks should be tied.
* @param options.ignore - The values to ignore.
*/
export declare function createConfig(options: CreateConfigOptions): Config
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27