react-email-editor icon indicating copy to clipboard operation
react-email-editor copied to clipboard

Dropdown not displaying selected option

Open IamNotHuman opened this issue 4 years ago • 0 comments

My dropdown is not displaying the selected option.

<EmailEditor projectId={55576} ref={this.emailEditorRef} onLoad={() => setTimeout(() => this.onLoad(), 0)} options={{ customJS: [ unlayer.registerTool({ name: 'question_tool', label: 'Question', icon: 'fa-question', supportedDisplayModes: ['web', 'email'], options: { questions: { title: 'Choose a question', options:{ questions: { name: 'question', label: 'Question list', defaultValue: '#1', widget: 'dropdown', } } }, }, values: {}, renderer: { Viewer: unlayer.createViewer({ render(values) { return values.data.value }, }), exporters: { web(values) { return values.data.value }, email(values) { return values.data.value }, head: { css: function (values) {}, js: function (values) {}, }, }, }, }); ], }} onReady={this.onReady} appearance={{ theme: 'dark', }} tools={{ 'custom#question_tool': { data: { value: 'Select a question', }, properties: { questions: { editor: { data: { options: [ { label: 'Question 1', value: '#1' }, { label: 'Question 2', value: '#2' }, { label: 'Question 3', value: '#3' }, { label: 'Question 4', value: '#4' }, ], }, }, }, }, }, }} />

IamNotHuman avatar Jan 06 '22 20:01 IamNotHuman