Skip to content
This repository has been archived by the owner on Aug 25, 2021. It is now read-only.

Add forced line wrap for category select #130

Merged
merged 2 commits into from
Jul 9, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/forms/select-styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,15 @@ const customStyles = {
position: 'relative',
top: 10,
}),
option: (provided, { isFocused, isSelected, isMulti }) => ({
option: (provided, {
isFocused, isSelected, isMulti, breakAll,
}) => ({
...provided,
'background-color': isSelected ? '#0088ce' : isFocused ? '#def3ff' : '#ffffff', // eslint-disable-line no-nested-ternary
'border-color': isSelected ? '#0088ce' : isFocused ? '#bee1f4' : 'transparent', // eslint-disable-line no-nested-ternary
'border-style': 'solid',
'border-width': '1px 0',
'word-break': breakAll ? 'break-all' : 'break-word',
color: isSelected ? '#fff' : isFocused ? '#4d5258' : provided.color, // eslint-disable-line no-nested-ternary
padding: '1px 10px',
fontWeight: '400',
Expand Down
1 change: 1 addition & 0 deletions src/tagging/components/InnerComponents/TagSelector.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ class TagSelector extends React.Component {
<Select
id="tag_cat"
value={val}
breakAll
className="final-form-select"
optionClassName="selected-option final-form-select-option"
styles={customStyles}
Expand Down
1 change: 1 addition & 0 deletions src/tagging/tests/__snapshots__/tag.selector.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

exports[`Tagging modifier match snapshot 1`] = `
<StateManager
breakAll={true}
className="final-form-select"
classNamePrefix="react-select"
clearable={false}
Expand Down