1. #1
    Sencha User
    Join Date
    Jun 2012
    Posts
    20
    Vote Rating
    0
    nayak.kavya is on a distinguished road

      0  

    Default Unanswered: Problem with empty text config of sencha list

    Unanswered: Problem with empty text config of sencha list


    Hi,

    I am using EmptyText for a list to show “No Data” text when list is empty.The problem is,I get this text even when store loading is in progress.I want to show this text only once store data loading is finished and there is no data to show in the list.I used also deferEmptyText to resolve this issue, but of no use. Please suggest me for the same.

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,978
    Answers
    660
    Vote Rating
    453
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    Have a look at the refresh function to override the default behavior.

    You would most likely need to clear it after you remove the records instead of waiting for the refresh to take place to update display.

    Code:
                if (records.length < 1) {
                    if (!me.deferEmptyText || me.hasSkippedEmptyText) {
                        Ext.core.DomHelper.insertHtml('beforeEnd', targetEl.dom, me.emptyText);
                    }
                    me.all.clear();
                } else {
                    me.all.fill(Ext.query(me.getItemSelector(), targetEl.dom));
                    me.updateIndexes(0);
                }
    Scott.

Thread Participants: 1

Tags for this Thread