export isRequired for selectable inputs

This commit is contained in:
nklhrstv 2020-02-13 17:57:37 +02:00
parent 42846d7392
commit fd8a6ecc72

View file

@ -110,6 +110,7 @@ const mapSelectableInputs = (discover) => {
};
const extraSelects = discover.selectable.extra.map((extra) => {
const title = `Select ${extra.name}`;
const isRequired = extra.isRequired;
const options = (extra.isRequired ? [] : [NONE_EXTRA_VALUE])
.concat(extra.options)
.map((option) => ({
@ -141,7 +142,7 @@ const mapSelectableInputs = (discover) => {
}
});
};
return { title, options, selected, renderLabelText, onSelect };
return { title, isRequired, options, selected, renderLabelText, onSelect };
});
const paginationInput = discover.selectable.has_prev_page || discover.selectable.has_next_page ?
{