Skip to content

Commit

Permalink
Fix react select error state
Browse files Browse the repository at this point in the history
  • Loading branch information
jochenklar committed Nov 10, 2024
1 parent 40208cd commit 6c5e2f3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions rdmo/core/assets/scss/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -496,3 +496,7 @@ li.has-warning > a.control-label > i {
color: $link-color;
cursor: pointer;
}

.has-error .react-select__control {
border-color: #a94442;
}
5 changes: 3 additions & 2 deletions rdmo/projects/assets/js/interview/components/main/Search.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ const Search = ({ attribute, values, setValues, collection = false }) => {
<AsyncSelect
key={JSON.stringify(values.project)}
classNamePrefix="react-select"
className='react-select'
placeholder={gettext('Search for project or snapshot title, or answer text ...')}
noOptionsMessage={() => gettext(
'No answers match your search.'
Expand Down Expand Up @@ -85,8 +86,8 @@ const Search = ({ attribute, values, setValues, collection = false }) => {
/>

<AsyncSelect
classNamePrefix="react-select"
className="mt-10"
classNamePrefix='react-select'
className='react-select mt-10'
placeholder={gettext('Restrict the search to a particular project ...')}
noOptionsMessage={() => gettext(
'No projects matche your search.'
Expand Down

0 comments on commit 6c5e2f3

Please sign in to comment.