Skip to content

Commit

Permalink
fix: Fuselage-uikit select errors (#143)
Browse files Browse the repository at this point in the history
  • Loading branch information
ggazzo authored Feb 10, 2020
1 parent 651076d commit ad4af66
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/fuselage-ui-kit/src/StaticSelect.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)])}
Expand All @@ -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)} />;
Expand Down

0 comments on commit ad4af66

Please sign in to comment.