Reputation: 13
I want to display the Project Name and other indexes from filteredResults
, how can I map it and its indexes? Or parsing?
I put it on onClick
event:
function filter() {
var filteredResults = projectData.filter((f => f.ProjectName.includes(filterKeyword) && (f => f.PartitionKey.includes(nameArea))));
console.log(filteredResults);
};
return:
<Stack direction="row" id="projectResults">
<Masonry columns={2} spacing={2}>
{!!projectData && (
projectData.map((card, index) => (
<MasonryItem key={card.RowKey}>
...
</MasonryItem>
))
)}
</Masonry>
</Stack>
Upvotes: 0
Views: 51
Reputation: 8558
Your filter callback
is not valid.
Try changing it to this:
var filteredResults = projectData.filter(f => f.ProjectName.includes(filterKeyword) && f.PartitionKey.includes(nameArea));
Upvotes: 1