namratha Mk
namratha Mk

Reputation: 23

My react multiselect keeps expanding as i add the options

I am using react select module to construct a multi-select dropbox. however as i add more than one option, the box keeps expanding, I want it to remain fixed. What css property should I change or is there another way to do this. Refer the pictures to get a clear understanding.

enter image description here

enter image description here

enter image description here

My form inline code for select:

<FormGroup
        controlId="ChannelType"
      >

        <div style={this.selectwidth}>
          <Select
            closeOnSelect={!stayOpen}
            multi={true}
            onChange={this.handleChannelSelect.bind(this)}
            options={ChannelTypes}
            placeholder="Select"
            removeSelected={false}
            simpleValue
          />
        </div>
        {' '}

      </FormGroup>

link for css of react-select :link

Upvotes: 0

Views: 515

Answers (1)

Vipin Kumar
Vipin Kumar

Reputation: 6546

Set autosize prop to false

Link: https://www.npmjs.com/package/react-select#select-props

Upvotes: 1

Related Questions