Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix notification_emails field showing up empty in RB #5731

Merged
merged 1 commit into from Apr 11, 2023
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGES.rst
Expand Up @@ -36,6 +36,8 @@ Bugfixes
- Fix being unable to set the "speakers and authors" as the default contribution
submitter type (:pr:`5711`)
- Check server-side if Call for Papers is open when submitting a paper (:pr:`5725`)
- Fix room notification email list showing up empty when editing it (:issue:`5729`,
:pr:`5731`)

Internal Changes
^^^^^^^^^^^^^^^^
Expand Down
3 changes: 1 addition & 2 deletions indico/web/client/js/react/components/EmailListField.jsx
Expand Up @@ -21,12 +21,11 @@ const isValid = value => /^\S+@\S+\.\S+$/.test(value);
*/
const EmailListField = props => {
const {value, disabled, onChange, onFocus, onBlur} = props;
const [options, setOptions] = useState(value.filter(isValid).map(x => ({text: x, value: x})));
const [searchQuery, setSearchQuery] = useState('');
const options = value.filter(isValid).map(x => ({text: x, value: x}));

const setValue = newValue => {
newValue = _.uniq(newValue.filter(isValid));
setOptions(newValue.map(x => ({text: x, value: x})));
onChange(newValue);
onFocus();
onBlur();
Expand Down