Results 1 to 4 of 4

Thread: Picker update: slot area covers toolbar after data update

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Sencha User
    Join Date
    Oct 2011
    Vote Rating

    Question Answered: Picker update: slot area covers toolbar after data update

    I tried following codes to update the data of a picker component.
    Data/slot is successfully updated, however, the slot area goes up and covers toolbar area. I am not sure what's wrong with current codes:
    <!DOCTYPE html><html>
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/> 
        <meta name="apple-mobile-web-app-capable" content="yes"/> 
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 
        <link rel="stylesheet" href="" type="text/css">
        <script type="text/javascript" src=""></script> 
        <script type="text/javascript">
            onReady : function() {
                var picker = Ext.create('Ext.Picker', {
                    id: 'pickCmp',
                    doneButton: false,
                    cancelButton: false,
                    layout: 'fit',
                    toolbar: {
                        ui: 'light',
                        title: 'My Picker!',
                        items: [{
                            xtype: 'button',
                            text: 'update',
                            handler: function() {
                                var p = Ext.getCmp('pickCmp');
                                var newSlots = [
                                        title: 'Speed',
                                        data : [
                                            {text: '10 KB/s', value: 10},
                                            {text: '20 KB/s', value: 20},
                                            {text: '30 KB/s', value: 30},
                                            {text: '40 KB/s', value: 40}
                                p.updateSlots(newSlots, p.getSlots());
                    slots: [
                            title: 'Speed',
                            data : [
                                {text: '50 KB/s', value: 50},
                                {text: '100 KB/s', value: 100},
                                {text: '200 KB/s', value: 200},
                                {text: '300 KB/s', value: 300}
    my ultimate goal is to dynamically update data. but for test, I just add a button "Update" to manually update...

    thanks for any replies and views!

  2. This is a bug which I have already fixed. The issue is, that, it is removing all items from the picker, including the toolbar.

    Also, you should not use updateSlots, but setSlots. updateSlots is a private method.

Tags for this Thread

Posting Permissions

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