diff --git a/src/TableOfContents/index.tsx b/src/TableOfContents/index.tsx index 0c7b4f99..5cdece1e 100644 --- a/src/TableOfContents/index.tsx +++ b/src/TableOfContents/index.tsx @@ -1,11 +1,10 @@ -import { Button, Drawer, InputGroup, MenuItem } from '@blueprintjs/core'; +import { Button, Drawer } from '@blueprintjs/core'; import cn from 'classnames'; import { flatMap, range } from 'lodash'; import * as React from 'react'; import { FAIcon, FAIconProp } from '../FAIcon'; import { ScrollContainer } from '../ScrollContainer'; -import { ItemRenderer, Select } from '../Select'; export type TableOfContentsItem = { name: React.ReactNode; @@ -80,18 +79,6 @@ export interface ITableOfContents void; - - // provide filter and onChangeFilter to enable filtering. - selectFilter?: { - items: SelectItem[]; - onSelect: (value: SelectItem) => void; - activeItem?: SelectItem; - initialContent?: string; - }; } // This is to avoid "mismatch" when rendering during SSR, since we render without scroll container in SSR @@ -172,65 +159,17 @@ export function TableOfContents {}, withScroller, - filter, - onChangeFilter, - selectFilter, ...innerProps }: ITableOfContents) { useRenderWithScroll(); const isMobile = false; // useIsMobile(enableDrawer); - const hasFilter = filter !== undefined && onChangeFilter; - - const SelectGroup = Select.ofType(); - - const toc = ; - - const renderSelect: ItemRenderer = (item, { handleClick, modifiers }) => { - if (!modifiers.matchesPredicate) { - return null; - } - return ( - - ); - }; - - function getActiveItem() { - return selectFilter?.activeItem; - } + const toc = ; const containerClassName = cn('TableOfContents', className); const comp = ( <> -
- {selectFilter != undefined && ( - -
{renderWithScroll && withScroller ? {toc} : toc}