mirror of
https://github.com/dzeiocom/components.git
synced 2025-04-23 03:12:14 +00:00
fix: choices not having choices on start
Signed-off-by: Avior <f.bouillon@aptatio.com>
This commit is contained in:
parent
8d6e256fb1
commit
644cb5b1aa
@ -52,6 +52,30 @@ tmp.args = {defaultValue : 'd', label: 'Label', helper: 'Helper', choices: [
|
||||
|
||||
export const AutoComplete = tmp
|
||||
|
||||
tmp = Input.bind({})
|
||||
tmp.args = {label: 'Label', helper: 'Helper', strictChoices: true, choices: [
|
||||
'a',
|
||||
'a',
|
||||
'a',
|
||||
'a',
|
||||
'a',
|
||||
'a',
|
||||
'a',
|
||||
'a',
|
||||
'b',
|
||||
{value: 'd', display: 'D'},
|
||||
{value: '4', display: 'Mai'},
|
||||
'cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc'
|
||||
], iconLeft: {
|
||||
icon: X,
|
||||
transformer: (v: string) => {
|
||||
console.log("POUET :D")
|
||||
return ""
|
||||
}
|
||||
}}
|
||||
|
||||
export const Select = tmp
|
||||
|
||||
tmp = Input.bind({})
|
||||
tmp.args = {block: true, type: 'textarea', defaultValue : 'd', label: 'Label', helper: 'Helper', choices: [
|
||||
'a',
|
||||
|
@ -108,6 +108,10 @@ export default class Input extends React.PureComponent<Props, States> {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
if (this.props.choices) {
|
||||
this.setState({list: this.buildList()})
|
||||
}
|
||||
}
|
||||
|
||||
public componentWillUnmount() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user