olahol / react-tagsinput

Highly customizable React component for inputing tags.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Input with dynamic width

anthony-bernardo opened this issue · comments

I have a bug with this feature. The input show at start only 2px of the input

When the page is initialized :

Screenshot

Then when I click on the input, it's ok :

Screenshot2

    <div className="form-group">
        <TagsInput value={props.tags}
                   onChange={(tags) => props.handleChange(tags)}
                   onlyUnique={true}
                   inputProps={{
                       className: 'react-tagsinput-input',
                       placeholder: 'Booking-code'
                   }}
                   renderInput={
                       function autosizingRenderInput({addTag, ...props}) {
                           let {onChange, value, ...other} = props
                           return (
                               <AutosizeInput type='text'  onChange={onChange} value={value} {...other} />
                           )
                       }
                   }
        />
    </div>