File tree Expand file tree Collapse file tree 1 file changed +17
-10
lines changed
packages/strapi-design-system/src/Combobox Expand file tree Collapse file tree 1 file changed +17
-10
lines changed Original file line number Diff line number Diff line change @@ -20,25 +20,27 @@ import { KeyboardKeys } from '../helpers/keyboardKeys';
20
20
import { VisuallyHidden } from '../VisuallyHidden' ;
21
21
22
22
export const Combobox = ( {
23
+ children : nodes ,
23
24
clearLabel,
25
+ creatable,
24
26
createMessage,
25
27
disabled,
26
- hint,
27
28
error,
29
+ hasMoreItems,
30
+ hint,
28
31
label,
29
- value,
30
- onChange,
31
- placeholder,
32
- creatable,
32
+ labelAction,
33
33
loading,
34
34
loadingMessage,
35
+ noOptionsMessage,
36
+ onChange,
37
+ onClear,
35
38
onCreateOption,
36
39
onInputChange,
37
40
onLoadMore,
38
- noOptionsMessage,
39
- hasMoreItems,
40
- children : nodes ,
41
- onClear,
41
+ placeholder,
42
+ required,
43
+ value,
42
44
...props
43
45
} ) => {
44
46
const getInputValueFromNodes = ( ) =>
@@ -250,7 +252,11 @@ export const Combobox = ({
250
252
{ value }
251
253
</ VisuallyHidden >
252
254
< Stack spacing = { label || hint || error ? 1 : 0 } >
253
- { label && < FieldLabel id = { labelId } > { label } </ FieldLabel > }
255
+ { label && (
256
+ < FieldLabel action = { labelAction } required = { required } id = { labelId } >
257
+ { label }
258
+ </ FieldLabel >
259
+ ) }
254
260
< MainRow ref = { containerRef } $disabled = { disabled } hasError = { error } >
255
261
< InputContainer wrap = "wrap" >
256
262
{ ! inputValue && value && (
@@ -396,6 +402,7 @@ Combobox.propTypes = {
396
402
hasMoreItems : PropTypes . bool ,
397
403
hint : PropTypes . oneOfType ( [ PropTypes . string , PropTypes . node , PropTypes . arrayOf ( PropTypes . node ) ] ) ,
398
404
label : PropTypes . string ,
405
+ labelAction : PropTypes . element ,
399
406
loading : PropTypes . bool ,
400
407
loadingMessage : PropTypes . string ,
401
408
noOptionsMessage : PropTypes . func ,
You can’t perform that action at this time.
0 commit comments