From 533825cf2e5ed9fff6ccfa29240a8679bbb4d51d Mon Sep 17 00:00:00 2001 From: samx Date: Tue, 19 Nov 2019 16:17:48 -0300 Subject: [PATCH] fix(components): use dynamic OptionCreator in OptionsList component feature/select-with-image --- src/components/blipSelect/OptionsList.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/blipSelect/OptionsList.js b/src/components/blipSelect/OptionsList.js index 90c0aed..b7d2d25 100644 --- a/src/components/blipSelect/OptionsList.js +++ b/src/components/blipSelect/OptionsList.js @@ -20,6 +20,7 @@ export class OptionsList extends Component { this.props = { options: [], canAddOptions: false, + OptionCreator: SelectOption, } } @@ -32,10 +33,13 @@ export class OptionsList extends Component { ...props, } + const { OptionCreator } = this.props + const renderOption = (option) => - new SelectOption({ + new OptionCreator({ onOptionClick: this.options.onOptionClick, onTryAccessInput: this.options.onTryAccessInput, + descriptionPosition: this.props.descriptionPosition, }).render(option) return html`