Skip to content

Commit

Permalink
Workaround for IE weirdness re. onChange events. Fixes #365 with temp…
Browse files Browse the repository at this point in the history
… workaround.
  • Loading branch information
gertsonderby committed Jan 25, 2017
1 parent 90053fc commit 67efab9
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions Website/Composite/console/components/presentation/Dialog.js
Expand Up @@ -94,6 +94,13 @@ const Dialog = props => {
// Complete dialog activity, send back data using provider
props.dispatch(fireAction(paneDef.get('finishProvider').toJS(), props.dialogDef.get('name'), props.dialogData.toJS()));
} : null;
const searchFunction = event => props.dispatch(
setDialogState(
props.dialogDef.get('name'),
props.dialogData
.set('filterText', event.target.value)
)
);
return <DialogBox
onContextMenu={event => {
event.preventDefault(); // To not show the default menu
Expand All @@ -102,13 +109,8 @@ const Dialog = props => {
<SearchField
placeholder={props.dialogDef.get('searchPlaceholder')}
value={props.dialogData.get('filterText')}
onChange={event => props.dispatch(
setDialogState(
props.dialogDef.get('name'),
props.dialogData
.set('filterText', event.target.value)
)
)}/>
onChange={searchFunction}
onInput={searchFunction}/>
<SearchIcon id='magnifier'/>
<DialogPane>
<Pane dialogName={props.dialogDef.get('name')} paneDef={paneDef} itemGroups={props.itemGroups} dialogData={props.dialogData} dispatch={props.dispatch} nextAction={nextAction || finishAction}/>
Expand Down

0 comments on commit 67efab9

Please sign in to comment.