Documentation fixes
This commit is contained in:
parent
a1085893b8
commit
dfa771b992
8 changed files with 41 additions and 44 deletions
|
|
@ -89,8 +89,7 @@
|
||||||
data: pressFreedom,
|
data: pressFreedom,
|
||||||
title: 'Press Freedom Index',
|
title: 'Press Freedom Index',
|
||||||
paginated: true,
|
paginated: true,
|
||||||
source:
|
source: 'Source: Reporters Without Borders',
|
||||||
"Source: <a href='https://en.wikipedia.org/wiki/Press_Freedom_Index'>Reporters Without Borders</a>",
|
|
||||||
}}"
|
}}"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
@ -102,8 +101,7 @@
|
||||||
searchable: true,
|
searchable: true,
|
||||||
paginated: true,
|
paginated: true,
|
||||||
title: 'Press Freedom Index',
|
title: 'Press Freedom Index',
|
||||||
source:
|
source: 'Source: Reporters Without Borders',
|
||||||
"Source: <a href='https://en.wikipedia.org/wiki/Press_Freedom_Index'>Reporters Without Borders</a>",
|
|
||||||
}}"
|
}}"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
@ -115,8 +113,7 @@
|
||||||
paginated: true,
|
paginated: true,
|
||||||
filterField: 'Region',
|
filterField: 'Region',
|
||||||
title: 'Press Freedom Index',
|
title: 'Press Freedom Index',
|
||||||
notes:
|
notes: 'Source: Reporters Without Borders',
|
||||||
"Source: <a href='https://en.wikipedia.org/wiki/Press_Freedom_Index'>Reporters Without Borders</a>",
|
|
||||||
}}"
|
}}"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
@ -130,8 +127,7 @@
|
||||||
paginated: true,
|
paginated: true,
|
||||||
title: 'Press Freedom Index',
|
title: 'Press Freedom Index',
|
||||||
dek: 'Reporters Without Borders ranks countries based on their level of press freedom using criteria such as the degree of media pluralism and violence against journalists.',
|
dek: 'Reporters Without Borders ranks countries based on their level of press freedom using criteria such as the degree of media pluralism and violence against journalists.',
|
||||||
source:
|
source: 'Source: Reporters Without Borders',
|
||||||
"Source: <a href='https://en.wikipedia.org/wiki/Press_Freedom_Index'>Reporters Without Borders</a>",
|
|
||||||
}}"
|
}}"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
@ -145,8 +141,7 @@
|
||||||
sortDirection: 'descending',
|
sortDirection: 'descending',
|
||||||
paginated: true,
|
paginated: true,
|
||||||
title: 'Press Freedom Index',
|
title: 'Press Freedom Index',
|
||||||
source:
|
source: 'Source: Reporters Without Borders',
|
||||||
"Source: <a href='https://en.wikipedia.org/wiki/Press_Freedom_Index'>Reporters Without Borders</a>",
|
|
||||||
}}"
|
}}"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,12 +2,13 @@ Feel free to both search and filter.
|
||||||
|
|
||||||
```svelte
|
```svelte
|
||||||
<Table
|
<Table
|
||||||
data="{yourData}",
|
data="{yourData}"
|
||||||
searchable="{true}",
|
,
|
||||||
filterField="{'Region'}",
|
searchable="{true}"
|
||||||
paginated="{true}",
|
filterField="{'Region'}"
|
||||||
title="{'Press Freedom Index'}",
|
paginated="{true}"
|
||||||
dek="{'Reporters Without Borders ranks countries based on their level of press freedom using criteria such as the degree of media pluralism and violence against journalists.'}",
|
title="{'Press Freedom Index'}"
|
||||||
source="{'Source: <a href="https://en.wikipedia.org/wiki/Press_Freedom_Index">Reporters Without Borders</a>'}",
|
dek="{'Reporters Without Borders ranks countries based on their level of press freedom using criteria such as the degree of media pluralism and violence against journalists.'}"
|
||||||
|
source="{'Source: Reporters Without Borders'}"
|
||||||
/>
|
/>
|
||||||
```
|
```
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,11 @@ Allow users to filter the table by providing one of the attributes as the `filte
|
||||||
|
|
||||||
```svelte
|
```svelte
|
||||||
<Table
|
<Table
|
||||||
data="{yourData}",
|
data="{yourData}"
|
||||||
filterField="{'Region'}",
|
,
|
||||||
paginate="{true}"
|
filterField="{'Region'}"
|
||||||
title="{'Press Freedom Index'}",
|
paginated="{true}"
|
||||||
notes="{'Source: <a href="https://en.wikipedia.org/wiki/Press_Freedom_Index">Reporters Without Borders</a>'}",
|
title="{'Press Freedom Index'}"
|
||||||
|
notes="{'Source: Reporters Without Borders'}"
|
||||||
/>
|
/>
|
||||||
```
|
```
|
||||||
|
|
|
||||||
|
|
@ -4,18 +4,18 @@ Among other things, this feature can be used to provide a unit of measurement wi
|
||||||
|
|
||||||
```svelte
|
```svelte
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
const fieldFormatters = {
|
const fieldFormatters = {
|
||||||
'Net worth (in billions)': (v) => '$' + v.toFixed(1)
|
'Net worth (in billions)': (v) => '$' + v.toFixed(1),
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Table
|
<Table
|
||||||
data="{yourData}"
|
data="{yourData}"
|
||||||
fieldFormatters="{fieldFormatters}",
|
fieldFormatters="{fieldFormatters}"
|
||||||
sortable="{true}",
|
sortable="{true}"
|
||||||
sortField="{'Score'}",
|
sortField="{'Score'}"
|
||||||
sortDirection="{'descending'}",
|
sortDirection="{'descending'}"
|
||||||
title:"{'The Richest Women in the World'}",
|
title="{'The Richest Women in the World'}"
|
||||||
source: "{'Source: Forbes'}",
|
source="{'Source: Forbes'}"
|
||||||
/>
|
/>
|
||||||
```
|
```
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,6 @@ This is a good option when publishing large tables for readers to explore. It wo
|
||||||
data="{yourData}"
|
data="{yourData}"
|
||||||
paginated="{true}"
|
paginated="{true}"
|
||||||
title="{'Press Freedom Index'}"
|
title="{'Press Freedom Index'}"
|
||||||
source="{'<a href="https://en.wikipedia.org/wiki/Press_Freedom_Index">Reporters Without Borders</a>'}"
|
source="{'Reporters Without Borders'}"
|
||||||
/>
|
/>
|
||||||
```
|
```
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,10 @@ Allow users to search the table by setting the optional `searchable` variable. M
|
||||||
|
|
||||||
```svelte
|
```svelte
|
||||||
<Table
|
<Table
|
||||||
data="{yourData}",
|
data="{yourData}"
|
||||||
searchable="{true}",
|
searchable="{true}"
|
||||||
paginated="{true}",
|
paginated="{true}"
|
||||||
title="{'Press Freedom Index'}",
|
title="{'Press Freedom Index'}"
|
||||||
notes="{'Source: <a href="https://en.wikipedia.org/wiki/Press_Freedom_Index">Reporters Without Borders</a>'}",
|
notes="{'Source: Reporters Without Borders'}"
|
||||||
/>
|
/>
|
||||||
```
|
```
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
Allow users to sort the table by setting the `searchable` input. Specify the starting order by setting `sortField` to a column name and `sortDirection` to `ascending` or `descending`.
|
Allow users to sort the table by setting the `sortable` input. Specify the starting order by setting `sortField` to a column name and `sortDirection` to `ascending` or `descending`.
|
||||||
|
|
||||||
```svelte
|
```svelte
|
||||||
<Table
|
<Table
|
||||||
data="{yourData}"
|
data="{yourData}"
|
||||||
sortable="{true},"
|
sortable="{true}"
|
||||||
sortField="{'Score'},"
|
sortField="{'Score'}"
|
||||||
sortDirection="{'descending'},"
|
sortDirection="{'descending'}"
|
||||||
title="{'Press Freedom Index'},"
|
title="{'Press Freedom Index'}"
|
||||||
source="{'Source: <a href="https://en.wikipedia.org/wiki/Press_Freedom_Index">Reporters Without Borders</a>'},"
|
source="{'Source: Reporters Without Borders'}"
|
||||||
/>
|
/>
|
||||||
```
|
```
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
When you table has 10 or more rows, consider clipping it by setting the `truncated` option. When it is enabled, the table is clipped and readers must request to see all rows by clicking a button below the table. By default this configuration will limit the table to five records. You can adjust the cutoff point by adjusting the `truncateLength` option.
|
When you table has 10 or more rows, consider clipping it by setting the `truncated` option. When it is enabled, the table is clipped and readers must request to see all rows by clicking a button below the table. By default this configuration will limit the table to five records. You can change the cutoff point by adjusting the `truncateLength` option.
|
||||||
|
|
||||||
This is a good option for simple tables with row counts between 10 and 30. It works best when the table doesn't require interactivity.
|
This is a good option for simple tables with row counts between 10 and 30. It works best when the table doesn't require interactivity.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue