Skip to content

Commit

Permalink
Fix for #1453
Browse files Browse the repository at this point in the history
  • Loading branch information
Remi749 committed Jan 25, 2024
1 parent 5255d5e commit d275927
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,14 @@ export const createPortfolioAggregationReducer = (

let items: IFilterItemProps[] = uniqueValues
.filter((value: string) => !stringIsNullOrEmpty(value))
.map((value: string) => ({ name: value, value, selected: false }))
.map((value: string) => {
if (column.fieldName.includes('OWSUSER')) {
const match = value.match(/\|([^|]+)\|/)
value = match ? match[1].trim() : null
}

return { name: value, value, selected: false }
})
items = items.sort((a, b) => (a.value > b.value ? 1 : -1))
return { column, items }
})
Expand Down
7 changes: 2 additions & 5 deletions SharePointFramework/PortfolioWebParts/src/data/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,8 @@ export class DataAdapter implements IPortfolioWebPartsDataAdapter {
level = level ?? calculatedLevel

const columns: ProjectContentColumn[] = await new Promise((resolve, reject) => {
this.portalDataService.fetchProjectContentColumns(
'PROJECT_CONTENT_COLUMNS',
category,
level
)
this.portalDataService
.fetchProjectContentColumns('PROJECT_CONTENT_COLUMNS', category, level)
.then(resolve)
.catch(reject)
})
Expand Down

0 comments on commit d275927

Please sign in to comment.