Fix Searchable token capitalization bug

Summary:
There's an issue with the Searchable component, where the keys in manually typed filters (key=value) are case sensitive, but you would never know that because even after creating a filter by clicking on a cell, the new one looks capitalized "Tag=..." where really it is "tag=...".

This changes the blue filter tokens to show what you would have to type to recreate it.

I haven't made the key case insensitive because there may be some capitalized uses of it out in the world and that would break them.
Also, it would be nice, as the capitalized key tends to be equal to the column name you see in the header, but that column name can actually be anything, so that could be a bit misleading.

Context: https://fb.workplace.com/groups/flippersupport/permalink/869112616902731/

Reviewed By: mweststrate

Differential Revision: D21448087

fbshipit-source-id: 8b28e3b890f024bbad03ffd0809e9e1e888075f0
This commit is contained in:
John Knox
2020-05-07 04:01:02 -07:00
committed by Facebook GitHub Bot
parent 7ba94248ae
commit 77ca337011

View File

@@ -47,7 +47,6 @@ const Key = styled(Text)<{
position: 'relative',
fontWeight: 500,
paddingRight: 12,
textTransform: 'capitalize',
lineHeight: '21px',
'&:after': {
content: props.type === 'exclude' ? '"≠"' : '"="',