mirror of
https://github.com/mattermost/focalboard.git
synced 2025-02-10 19:41:29 +02:00
Merge pull request #222 from BharatKalluri/fix/search_in_properties
Added search in properties of a card
This commit is contained in:
commit
2a16322492
@ -198,7 +198,21 @@ class MutableBoardTree implements BoardTree {
|
||||
return cards.slice()
|
||||
}
|
||||
|
||||
return cards.filter((card) => card.title?.toLocaleLowerCase().indexOf(searchText) !== -1)
|
||||
return cards.filter((card: Card) => {
|
||||
const searchTextInCardTitle: boolean = card.title?.toLocaleLowerCase().includes(searchText)
|
||||
if (searchTextInCardTitle) {
|
||||
return true
|
||||
}
|
||||
for (const property in card.properties) {
|
||||
if (
|
||||
Object.prototype.hasOwnProperty.call(card.properties, property) &&
|
||||
card.properties[property].toLowerCase().includes(searchText)
|
||||
) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
})
|
||||
}
|
||||
|
||||
private setGroupByProperty(propertyId: string) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user