fix(dashboard): show correct roles for dashboard access dropdown (#21549)

This commit is contained in:
Mayur 2022-09-26 19:53:38 +05:30 committed by GitHub
parent f4646f8edb
commit 73429c6b2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 149 additions and 34 deletions

File diff suppressed because one or more lines are too long

View File

@ -133,7 +133,9 @@ const PropertiesModal = ({
endpoint: `/api/v1/dashboard/related/${accessType}?q=${query}`,
}).then(response => ({
data: response.json.result
.filter((item: { extra: { active: boolean } }) => item.extra.active)
.filter((item: { extra: { active: boolean } }) =>
item.extra.active !== undefined ? item.extra.active : true,
)
.map((item: { value: number; text: string }) => ({
value: item.value,
label: item.text,