@@ -2,7 +2,7 @@ import React from 'react';
22import Button from './buttons' ;
33import Loader from './loaders' ;
44import { TimePicker } from './widgets' ;
5- import { EditorContext , getCsrfCookie , capitalize , convertType , getCoordsFromName } from '../util' ;
5+ import { EditorContext , getCsrfCookie , capitalize , convertType , getCoordsFromName , choicesValueTitleMap } from '../util' ;
66
77
88export function Label ( props ) {
@@ -213,6 +213,7 @@ export class FormMultiSelectInput extends React.Component {
213213 inputRef = { this . input }
214214 onClick = { this . toggleOptions }
215215 value = { this . props . value }
216+ options = { this . props . options }
216217 onChange = { this . handleChange }
217218 disabled = { this . props . readOnly }
218219 placeholder = { this . props . placeholder }
@@ -251,6 +252,7 @@ export class FormMultiSelectInputField extends React.Component {
251252 }
252253
253254 render ( ) {
255+ let valueTitleMap = choicesValueTitleMap ( this . props . options )
254256 return (
255257 < div
256258 className = "rjf-multiselect-field-input"
@@ -262,7 +264,7 @@ export class FormMultiSelectInputField extends React.Component {
262264 this . props . value . length ?
263265 this . props . value . map ( ( item , index ) => (
264266 < span className = "rjf-multiselect-field-input-item" key = { item + '_' + index } >
265- < span > { item } </ span >
267+ < span > { valueTitleMap [ item ] } </ span >
266268 { this . props . disabled || < button title = "Remove" type = "button" onClick = { ( e ) => this . handleRemove ( e , index ) } > ×</ button > }
267269 </ span >
268270 )
0 commit comments