Skip to content

Commit ed11a14

Browse files
authored
Merge pull request #1570 from afwillia/SWC-7229
SWC-7229 - Fix overflow on EnumFacetFilter
2 parents b4758cd + 3d771a8 commit ed11a14

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

packages/synapse-react-client/src/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilter.stories.tsx

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,27 @@ const facetValues: RenderedFacetValue[] = [
4242
{ value: 'foo', displayText: 'foo', count: 100, isSelected: false },
4343
{ value: 'bar', displayText: 'bar', count: 50, isSelected: false },
4444
{ value: 'baz', displayText: 'baz', count: 25, isSelected: false },
45+
{
46+
value: 'veryLongValue',
47+
displayText:
48+
'Very_long-text_that-will_overflow_the_sidebar_if_not-handled-correctly',
49+
count: 525600,
50+
isSelected: false,
51+
},
52+
{
53+
value: 'veryLongValue2',
54+
displayText:
55+
'string_with_underscores_that_will_overflow_if_not_handled_correctly',
56+
count: 42,
57+
isSelected: false,
58+
},
59+
{
60+
value: 'veryLongValue3',
61+
displayText:
62+
'a-long-string-with-hyphens-that-will-overflow-if-not-handled-correctly',
63+
count: 75,
64+
isSelected: false,
65+
},
4566
{ value: 'value1', displayText: 'value1', count: 10, isSelected: false },
4667
{ value: 'value2', displayText: 'value2', count: 9, isSelected: false },
4768
{ value: 'value3', displayText: 'value3', count: 8, isSelected: false },

packages/synapse-react-client/src/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterOption.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ export function EnumFacetFilterOption(props: EnumFacetFilterOptionProps) {
4242
<FormControlLabel
4343
control={control}
4444
className="EnumFacetFilter__checkbox"
45+
sx={{
46+
overflowWrap: 'anywhere',
47+
}}
4548
onClick={event => event.stopPropagation()}
4649
onChange={(_event, newValue) => {
4750
onChange(newValue)

0 commit comments

Comments
 (0)