-
Bug
-
Resolution: Unresolved
-
Later
-
None
-
6.5.5
-
Win 7 x64, all chrome and Blink based browsers
I'm using Bandbox as a filter in grid:
<auxheader>
<bandbox id="bdCellLabel" autodrop="true" onChange="@command('changeFilter',column=1, filterValue=self.getValue())" onOK="@command('changeFilter',column=1, filterValue=self.getValue())" onChanging="searchCellLabel.model = getMatchedData(event.value, invisibleSearchCellLabel);" width="100%" >
<bandpopup width="300px">
<panel height="200px">
<panelchildren>
<listbox id="invisibleSearchCellLabel" model="@load(vm.cellLabelFilterModel)" visible="false">
<template name="model">
<listitem label="@load(each)"/>
</template>
</listbox>
<listbox id="searchCellLabel" model="$
onSelect="bdCellLabel.value=self.selectedItem.label; bdCellLabel.close(); bdCellLabel.focus(); vm.bandBoxSelected(1,selectedValue=self.selectedItem.label);"/>
</panelchildren>
<toolbar>
<paging onCreate='searchCellLabel.setMold("paging");searchCellLabel.paginal=self;searchCellLabel.pageSize = 5;' />
</toolbar>
</panel>
</bandpopup>
</bandbox>
</auxheader>
<zscript><![CDATA[
public ListModel getMatchedData(String value, Listbox invisibleListbox) {
if(value==null || value.isEmpty()) { ListModelList listModelList = (ListModelList)invisibleListbox.getModel(); String[] strTable = (String[])listModelList.toArray(new String[listModelList.getSize()]); return new SimpleListModel(strTable); } else {
ListModelList results = new ListModelList();
ListModelList listModelList = (ListModelList)invisibleListbox.getModel();
for(Object o : listModelList) {
String str = (String) o;
if(str.toLowerCase().contains(value.toLowerCase())) { results.add(str); }
}
return results;
}
}
]]></zscript>
<auxheader>
<bandbox id="bdCellLabel" autodrop="true" onChange="@command('changeFilter',column=1, filterValue=self.getValue())" onOK="@command('changeFilter',column=1, filterValue=self.getValue())" onChanging="searchCellLabel.model = getMatchedData(event.value, invisibleSearchCellLabel);" width="100%" >
<bandpopup width="300px">
<panel height="200px">
<panelchildren>
<listbox id="invisibleSearchCellLabel" model="@load(vm.cellLabelFilterModel)" visible="false">
<template name="model">
<listitem label="@load(each)"/>
</template>
</listbox>
<listbox id="searchCellLabel" model="${strset}
" height="100%" width="100%" onCreate="self.model=invisibleSearchCellLabel.model; vm.setbandBoxListBox(self, self.id);" style="background:white;"
onSelect="bdCellLabel.value=self.selectedItem.label; bdCellLabel.close(); bdCellLabel.focus(); vm.bandBoxSelected(1, selectedValue=self.selectedItem.label);"/>
</panelchildren>
<toolbar>
<paging onCreate='searchCellLabel.setMold("paging");searchCellLabel.paginal=self;searchCellLabel.pageSize = 5;' />
</toolbar>
</panel>
</bandpopup>
</bandbox>
</auxheader>
<zscript><![CDATA[
public ListModel getMatchedData(String value, Listbox invisibleListbox) {
if(value==null || value.isEmpty())
else {
ListModelList results = new ListModelList();
ListModelList listModelList = (ListModelList)invisibleListbox.getModel();
for(Object o : listModelList) {
String str = (String) o;
if(str.toLowerCase().contains(value.toLowerCase()))
{ results.add(str); }}
return results;
}
}
]]></zscript>
vm.bandBoxSelected method has BindUtils.PostNotify at grid model
When I writing text in bandbox, and then select value from bandpopup,
after notifychanges on grid model Bandbox change his value from selected to typed before
example: type 'aaaa'
then select 'bbbb' from bandpopup, value in bandbox will be 'bbbb' but just second later it will change to 'aaaa'
The problem is only in Chrome based browsers.