Commit a63c931f authored by Andrei Mondoc's avatar Andrei Mondoc
Browse files

fix select controls, save IDs as string

parent 4568b384
......@@ -51,7 +51,9 @@ const SelectContributionPageControl = ({ id, setAttributes }) => {
<Select
placeholder={__('Select a Contribution page', 'civicrm')}
value={contributionPage || 0}
onChange={(option) => setAttributes({ id: option.value })}
onChange={(option) =>
setAttributes({ id: option.value.toSring() })
}
options={contributionPages}
components={{ Option: ContributionPageOption }}
/>
......
......@@ -64,7 +64,9 @@ const SelectEventControl = ({ id, setAttributes }) => {
<Select
placeholder={__('Select an Event', 'civicrm')}
value={event || 0}
onChange={(option) => setAttributes({ id: option.value })}
onChange={(option) =>
setAttributes({ id: option.value.toSring() })
}
options={events}
components={{ Option: EventOption }}
/>
......
......@@ -50,7 +50,9 @@ const SelectProfileControl = ({ gid, setAttributes }) => {
<Select
placeholder={__('Select a Profile', 'civicrm')}
value={profile || 0}
onChange={(option) => setAttributes({ gid: option.value })}
onChange={(option) =>
setAttributes({ gid: option.value.toString() })
}
options={profiles}
components={{ Option: ProfileOption }}
/>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment