Search: the id
prop on SearchResult should accept string
as value
#2135
Labels
id
prop on SearchResult should accept string
as value
#2135
From looking at the type definition for SearchResult.d.ts, the [key:strig]: any should allow me to add any additional props. However, when in typescript it will give warnings about them.
Warning: Failed prop type: Invalid prop results supplied to Search
It seems like it doesn't effect the functionality, but console gets flooded with these warnings Is this a typescript issue only and is there a workaround.
Example:
When you define the results:
In my case, I added
"tester" will be treated as an unknown property and warnings will come.
Also another question, is it possible to update the id to be an any. In my case, i have a string value of a GUID but because it's a number I can't set it.
Thanks,
Derek
The text was updated successfully, but these errors were encountered: