Skip to content

Commit

Permalink
Fix select input component
Browse files Browse the repository at this point in the history
  • Loading branch information
jochenklar committed Jan 17, 2025
1 parent 6f7e57f commit 23d4623
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,10 @@ import OptionText from './common/OptionText'
const SelectInput = ({ question, value, options, disabled, creatable, updateValue, buttons }) => {

const [inputValue, setInputValue] = useState('')
// const [isOpen, setIsOpen] = useState(false)

const handleChange = (option) => {
if (isNil(option)) {
// close the select input when the value is reset
// setIsOpen(false)
setInputValue('')

updateValue(value, {})
} else if (option.__isNew__ === true) {
updateValue(value, {
Expand Down Expand Up @@ -85,6 +81,7 @@ const SelectInput = ({ question, value, options, disabled, creatable, updateValu
const isAsync = question.optionsets.some((optionset) => optionset.has_search)

const selectProps = {
key: value.id,
classNamePrefix: 'react-select',
className: classnames,
backspaceRemovesValue: false,
Expand Down
4 changes: 4 additions & 0 deletions rdmo/projects/assets/scss/interview.scss
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,10 @@
display: inline;
}
}

.react-select {
max-width: 100%;
}
}

.badge-optional {
Expand Down

0 comments on commit 23d4623

Please sign in to comment.