Results 1 to 3 of 3

Thread: How to set a custom width to a combobox dropdown menu?

  1. #1
    Ext JS Premium Member
    Join Date
    Oct 2011
    Location
    Trieste, italy
    Posts
    31
    Vote Rating
    0
      0  

    Default Answered: How to set a custom width to a combobox dropdown menu?

    Hi,
    in my application I need to set a custom width to a combobox dropdown menu.
    In Extjs 6.5 Evant said me to use floatedPicker property.
    I tryed it in ExtReact but it seems doesn't works
    Example:
    Code:
    import React, { Component } from 'react';
    import { launch } from '@extjs/reactor';
    import { Grid, Column, RendererCell, Button, ComboBoxField} from '@extjs/ext-react';
    
    export default class MyExample extends Component {
    
        store = new Ext.data.Store({
            data: [
                { "name": "Lisa", "email": "lisa@simpsons.com", "phone": "555-111-1224" },
                { "name": "Bart", "email": "bart@simpsons.com", "phone": "555-222-1234" },
                { "name": "Homer", "email": "home@simpsons.com", "phone": "555-222-1244" },
                { "name": "Marge", "email": "marge@simpsons.com", "phone": "555-222-1254" }
            ]
        });
    
        render() {
            return (
                 <Grid store={this.store} ref={grid=>this.grid=grid}>
                 <Column text="name" dataIndex="name"/>
                 <Column text="Actions" dataIndex="name">
                     <RendererCell
                         renderer={(value, record) => (
                             <ComboBoxField
                                value={value}
                                options={[ 'aaaaa','bbbbbb','ccccc' ]}
                                valueField="name"
                                queryMode="local"
                                editable={false}
                                floatedPicker= {{
                                    width: 500
                                }}
                            />
                         )}
                     />
                 </Column>
             </Grid>
            )
        }
    }
    
    launch(<MyExample />);

  2. There is a property that may be useful to you: matchFieldWidth={false}

  3. #2
    Sencha User
    Join Date
    Sep 2017
    Posts
    4
    Answers
    1
    Vote Rating
    0
      0  

    Default

    There is a property that may be useful to you: matchFieldWidth={false}

  4. #3
    Ext JS Premium Member
    Join Date
    Oct 2011
    Location
    Trieste, italy
    Posts
    31
    Vote Rating
    0
      0  

    Default

    Thank you luis.santos!

Similar Threads

  1. Selecting value of combobox hides dropdown menu
    By Robind in forum Ext 3.x: Help & Discussion
    Replies: 3
    Last Post: 22 Apr 2015, 12:40 AM
  2. Combobox like dropdown menu
    By dmN86 in forum Ext: Q&A
    Replies: 6
    Last Post: 30 Dec 2011, 10:09 AM
  3. Replies: 1
    Last Post: 4 Feb 2010, 6:19 AM
  4. ComboBox dropdown has zero width in dialog
    By davidascher in forum Ext 1.x: Bugs
    Replies: 2
    Last Post: 4 Apr 2007, 3:45 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •