Unverified Commit ad4af663 authored by Guilherme Gazzo's avatar Guilherme Gazzo Committed by GitHub
Browse files

fix: Fuselage-uikit select errors (#143)

parent 651076df
......@@ -14,8 +14,9 @@ export const StaticSelect = ({
context,
...element
}) => {
const [{ loading, value }, action] = useBlockContext(element, context);
const [{ loading, value, error }, action] = useBlockContext(element, context);
return <SelectFiltered
error={error}
value={value}
mod-loading={loading}
options={options.map((option) => [option.value, parser.text(option.text)])}
......@@ -31,10 +32,11 @@ export const MultiStaticSelect = ({
placeholder = { text: 'select a option' },
...element
}) => {
const [{ loading, value }, action] = useBlockContext(element, context);
const [{ loading, value, error }, action] = useBlockContext(element, context);
return <MultiSelectFiltered
value={value}
mod-loading={loading}
error={error}
options={options.map((option) => [option.value, parser.text(option.text)])}
onChange={(value) => action({ target: { value } })}
placeholder={parser.text(placeholder)} />;
......
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