Skip to content
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
4 changes: 2 additions & 2 deletions docs/docs/examples/examples/03_postgres_source.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ slug: /examples/postgres_source
canonicalUrl: '/examples/postgres_source'
sidebar_custom_props:
image: /img/examples/postgres_source/cover.png
tags: [data-mapping, vector-index, postgres]
tags: [data-mapping, vector-index]
image: /img/examples/postgres_source/cover.png
tags: [data-mapping, vector-index, postgres]
tags: [data-mapping, vector-index]
---
import { GitHubButton, YouTubeButton, DocumentationButton } from '../../../src/components/GitHubButton';

Expand Down
38 changes: 20 additions & 18 deletions docs/src/theme/DocCardList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const TAGS = [
'multi-modal',
'structured-data-extraction',
'custom-building-blocks',
'data-mapping'
];

export default function DocCardList(props: Props): ReactNode {
Expand All @@ -28,16 +29,30 @@ export default function DocCardList(props: Props): ReactNode {
// Filter items by selected tag if any
const filteredItems = selectedTag
? items.filter(
(item) =>
Array.isArray(item?.customProps?.tags) &&
item.customProps.tags.includes(selectedTag)
)
(item) =>
Array.isArray(item?.customProps?.tags) &&
item.customProps.tags.includes(selectedTag)
)
: items;

return (
<>
<div className={styles.tagSelectorContainer}>
<div className={styles.tagSelectorGrid}>
<div className={styles.tagOption}>
<input
type="radio"
id="tag-all"
name="doccard-tag-filter"
value=""
checked={selectedTag === null}
onChange={() => setSelectedTag(null)}
className={styles.allTagsRadio}
/>
<label htmlFor="tag-all" className={styles.allTagsLabel}>
All Categories
</label>
</div>
{TAGS.map((tag) => (
<div key={tag} className={styles.tagOption}>
<input
Expand All @@ -54,20 +69,7 @@ export default function DocCardList(props: Props): ReactNode {
</label>
</div>
))}
<div className={styles.tagOption}>
<input
type="radio"
id="tag-all"
name="doccard-tag-filter"
value=""
checked={selectedTag === null}
onChange={() => setSelectedTag(null)}
className={styles.allTagsRadio}
/>
<label htmlFor="tag-all" className={styles.allTagsLabel}>
All Categories
</label>
</div>

</div>
</div>
<section className={clsx('row', className)}>
Expand Down