-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(AppliedTagFilter): show readonly applied filters
- Loading branch information
1 parent
7c04647
commit ca7f026
Showing
3 changed files
with
33 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { trpc } from '../../utils/trpcClient'; | ||
import { AppliedFilter } from '../AppliedFilter/AppliedFilter'; | ||
import { TagDropdown } from '../TagDropdown/TagDropdown'; | ||
|
||
interface AppliedTagsFilterProps { | ||
value?: string[]; | ||
label?: string; | ||
readOnly?: boolean; | ||
} | ||
|
||
export const AppliedTagFilter = ({ value = [], label, readOnly }: AppliedTagsFilterProps) => { | ||
const { data } = trpc.tag.getByIds.useQuery(value); | ||
|
||
return ( | ||
<AppliedFilter readOnly={readOnly} label={label}> | ||
<TagDropdown mode="multiple" value={data} readOnly={readOnly} placement="bottom" /> | ||
</AppliedFilter> | ||
); | ||
}; |
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