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,
|
||||
title: 'Press Freedom Index',
|
||||
paginated: true,
|
||||
source:
|
||||
"Source: <a href='https://en.wikipedia.org/wiki/Press_Freedom_Index'>Reporters Without Borders</a>",
|
||||
source: 'Source: Reporters Without Borders',
|
||||
}}"
|
||||
/>
|
||||
|
||||
|
|
@ -102,8 +101,7 @@
|
|||
searchable: true,
|
||||
paginated: true,
|
||||
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',
|
||||
}}"
|
||||
/>
|
||||
|
||||
|
|
@ -115,8 +113,7 @@
|
|||
paginated: true,
|
||||
filterField: 'Region',
|
||||
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',
|
||||
}}"
|
||||
/>
|
||||
|
||||
|
|
@ -130,8 +127,7 @@
|
|||
paginated: true,
|
||||
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.',
|
||||
source:
|
||||
"Source: <a href='https://en.wikipedia.org/wiki/Press_Freedom_Index'>Reporters Without Borders</a>",
|
||||
source: 'Source: Reporters Without Borders',
|
||||
}}"
|
||||
/>
|
||||
|
||||
|
|
@ -145,8 +141,7 @@
|
|||
sortDirection: 'descending',
|
||||
paginated: true,
|
||||
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',
|
||||
}}"
|
||||
/>
|
||||
|
||||
|
|
|
|||
|
|
@ -2,12 +2,13 @@ Feel free to both search and filter.
|
|||
|
||||
```svelte
|
||||
<Table
|
||||
data="{yourData}",
|
||||
searchable="{true}",
|
||||
filterField="{'Region'}",
|
||||
paginated="{true}",
|
||||
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.'}",
|
||||
source="{'Source: <a href="https://en.wikipedia.org/wiki/Press_Freedom_Index">Reporters Without Borders</a>'}",
|
||||
data="{yourData}"
|
||||
,
|
||||
searchable="{true}"
|
||||
filterField="{'Region'}"
|
||||
paginated="{true}"
|
||||
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.'}"
|
||||
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
|
||||
<Table
|
||||
data="{yourData}",
|
||||
filterField="{'Region'}",
|
||||
paginate="{true}"
|
||||
title="{'Press Freedom Index'}",
|
||||
notes="{'Source: <a href="https://en.wikipedia.org/wiki/Press_Freedom_Index">Reporters Without Borders</a>'}",
|
||||
data="{yourData}"
|
||||
,
|
||||
filterField="{'Region'}"
|
||||
paginated="{true}"
|
||||
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
|
||||
<script lang="ts">
|
||||
const fieldFormatters = {
|
||||
'Net worth (in billions)': (v) => '$' + v.toFixed(1)
|
||||
};
|
||||
const fieldFormatters = {
|
||||
'Net worth (in billions)': (v) => '$' + v.toFixed(1),
|
||||
};
|
||||
</script>
|
||||
|
||||
<Table
|
||||
data="{yourData}"
|
||||
fieldFormatters="{fieldFormatters}",
|
||||
sortable="{true}",
|
||||
sortField="{'Score'}",
|
||||
sortDirection="{'descending'}",
|
||||
title:"{'The Richest Women in the World'}",
|
||||
source: "{'Source: Forbes'}",
|
||||
fieldFormatters="{fieldFormatters}"
|
||||
sortable="{true}"
|
||||
sortField="{'Score'}"
|
||||
sortDirection="{'descending'}"
|
||||
title="{'The Richest Women in the World'}"
|
||||
source="{'Source: Forbes'}"
|
||||
/>
|
||||
```
|
||||
|
|
|
|||
|
|
@ -9,6 +9,6 @@ This is a good option when publishing large tables for readers to explore. It wo
|
|||
data="{yourData}"
|
||||
paginated="{true}"
|
||||
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
|
||||
<Table
|
||||
data="{yourData}",
|
||||
searchable="{true}",
|
||||
paginated="{true}",
|
||||
title="{'Press Freedom Index'}",
|
||||
notes="{'Source: <a href="https://en.wikipedia.org/wiki/Press_Freedom_Index">Reporters Without Borders</a>'}",
|
||||
data="{yourData}"
|
||||
searchable="{true}"
|
||||
paginated="{true}"
|
||||
title="{'Press Freedom Index'}"
|
||||
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
|
||||
<Table
|
||||
data="{yourData}"
|
||||
sortable="{true},"
|
||||
sortField="{'Score'},"
|
||||
sortDirection="{'descending'},"
|
||||
title="{'Press Freedom Index'},"
|
||||
source="{'Source: <a href="https://en.wikipedia.org/wiki/Press_Freedom_Index">Reporters Without Borders</a>'},"
|
||||
sortable="{true}"
|
||||
sortField="{'Score'}"
|
||||
sortDirection="{'descending'}"
|
||||
title="{'Press Freedom Index'}"
|
||||
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.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue