Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for filter by parent document (#6850)
* Backend support for filter by parent document * parentDocumentId -> documentId
- Loading branch information
Showing
14 changed files
with
145 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { CloseIcon } from "outline-icons"; | ||
import * as React from "react"; | ||
import { useTranslation } from "react-i18next"; | ||
import Document from "~/models/Document"; | ||
import { StyledButton } from "~/components/FilterOptions"; | ||
import Tooltip from "~/components/Tooltip"; | ||
|
||
type Props = { | ||
document: Document; | ||
onClick: React.MouseEventHandler; | ||
}; | ||
|
||
export function DocumentFilter(props: Props) { | ||
const { t } = useTranslation(); | ||
|
||
return ( | ||
<div> | ||
<Tooltip content={t("Remove document filter")} delay={350}> | ||
<StyledButton onClick={props.onClick} icon={<CloseIcon />} neutral> | ||
{props.document.title} | ||
</StyledButton> | ||
</Tooltip> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.