Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
RocketChat
Rocket.Chat.Fuselage
Commits
d373f42a
Unverified
Commit
d373f42a
authored
Feb 10, 2020
by
Guilherme Gazzo
Browse files
Merge remote-tracking branch 'origin/develop'
* origin/develop: fix: Fuselage-uikit select errors (#143) fix select errors
parents
f40c2252
618beabd
Changes
1
Hide whitespace changes
Inline
Side-by-side
packages/fuselage-ui-kit/src/StaticSelect.js
View file @
d373f42a
...
...
@@ -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
)}
/>
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment