[CLOSED] TagField clears store filter after select.

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    [CLOSED] TagField clears store filter after select.

    Hello.

    TagField appears to be clearing the stores filters after a user makes a section.
    This makes sense since since, I'm assuming, it uses filters when typing in the TagField to narrow down your selection options.
    However, this store already has a filter.
    After the selection is made, ext clears all filters, not just the filter it used to narrow the selections when typing.
    And, there is no trigger for after the filters are cleared so I can re-apply it.

    Any ideas or suggestions?

    The TagField:
    <ext:TagField runat="server" StoreID="RecipientsStore" QueryMode="Local" DisplayField="Email" ValueField="Email" SelectOnTab="false" HideSelected="true">
    	<Listeners>
    		<BeforeQuery Handler="#{RecipientsStore}.filter({property:'EnterpriseCD', value:#{EnterpriseComboBox}.value, id:'EnterpriseCD'});"></BeforeQuery>
    	</Listeners>
    </ext:TagField>
    This is the EXT JS code, the "me.store.clearFilter();" line is giving the headache.
    onItemSelect : function (sm, record) {
    	var me = this;
    
    	if (me.ignoreSelection || !me.isExpanded) {
    		return;
    	}
    
    	me.inputEl.dom.value = "";
    		
    	if (!me.createNewOnSelect) {
    		me.inputEl.dom.value = record.get(me.displayField);
    		if (me.collapseOnSelect !== false) {
    			me.collapse();
    		}
    
    		me.ignoreSelection++;
    		sm.deselect(record);
    		me.ignoreSelection--;
    	}
    	else {
    		me.addTagToInput(record);
    		
    		if (me.collapseOnSelect === true) {
    			me.collapse();
    		}
    	}
    
    	me.fireEvent("select", me, record);
    	me.store.clearFilter();
    	me.inputEl.focus();
    },
    I could possibly fire on the firing on the select event with a 1ms delay, but this seems like a band-aid.
    <ext:TagField runat="server" StoreID="RecipientsStore" QueryMode="Local" DisplayField="Email" ValueField="Email" SelectOnTab="false" HideSelected="true">
    	<Listeners>
    		<BeforeQuery Handler="#{RecipientsStore}.filter({property:'EnterpriseCD', value:#{EnterpriseComboBox}.value, id:'EnterpriseCD'});"></BeforeQuery>
    		<Select Delay="1" Handler="#{RecipientsStore}.filter({property:'EnterpriseCD', value:#{EnterpriseComboBox}.value, id:'EnterpriseCD'});"></Select>
    	</Listeners>
    </ext:TagField>
    Thanks.
    Last edited by CarlMGregory; Jun 17, 2016 at 10:32 PM.

Similar Threads

  1. Replies: 8
    Last Post: Jun 05, 2016, 7:10 PM
  2. [CLOSED] TagField : How to allow duplicate Tag in TagField
    By matrixwebtech in forum 2.x Legacy Premium Help
    Replies: 13
    Last Post: Dec 31, 2014, 1:51 PM
  3. Store not working with TagField
    By GKG4 in forum 2.x Help
    Replies: 5
    Last Post: Feb 13, 2014, 5:20 AM
  4. Replies: 0
    Last Post: Jul 21, 2012, 9:08 AM
  5. [CLOSED] [1.0] ComboBox automatically clears value?
    By MP in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Sep 27, 2010, 6:20 PM

Posting Permissions