fix: project loaders for mobx store (#3356)
* add loaders to all the dropdowns outside project wrpper * fix build errors * minor refactor for project states color --------- Co-authored-by: Rahul R <rahulr@Rahuls-MacBook-Pro.local>
This commit is contained in:
parent
151c355177
commit
9789068880
11 changed files with 112 additions and 53 deletions
|
|
@ -30,7 +30,7 @@ export const IssueLabelSelect: React.FC<Props> = observer((props) => {
|
|||
const { workspaceSlug } = router.query;
|
||||
// store hooks
|
||||
const {
|
||||
project: { projectLabels, fetchProjectLabels },
|
||||
project: { getProjectLabels, fetchProjectLabels },
|
||||
} = useLabel();
|
||||
// states
|
||||
const [query, setQuery] = useState("");
|
||||
|
|
@ -43,6 +43,9 @@ export const IssueLabelSelect: React.FC<Props> = observer((props) => {
|
|||
const { styles, attributes } = usePopper(referenceElement, popperElement, {
|
||||
placement: "bottom-start",
|
||||
});
|
||||
|
||||
const projectLabels = getProjectLabels(projectId);
|
||||
|
||||
// derived values
|
||||
const filteredOptions =
|
||||
query === "" ? projectLabels : projectLabels?.filter((l) => l.name.toLowerCase().includes(query.toLowerCase()));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue