Hi,
I am using the SearchField to swiftly filter values in a large list. The list initially had 1023 entries and it worked fine. Now, the list has grown to 9963 entries and it has stopped working. Are there any SearchField limits? If yes, what are they?
Thanks!
Request clarification before answering.
Update - I have now found the problem. It has nothing to do with the number of entries. The problem occurs when the column data from the model contains numbers only, for example 3026.
Question, how can I force the binding to be of type String for my column?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Frederico,
thanks for your reply. As you can read above I have used a Formatter in the view (when setting the value of the control). It did not work, but I will try again. Perhaps, I should do it ealier in the code, e.g. in the controller. Where in the code would you add the Formatter call?
Hi Frederico,
as I mentioned above, it does not seem to work for me. I use XML:
<StandardListItem
title="{path: 'someTitle', type : 'sap.ui.model.odata.type.String'}"
description="{path: 'someDesc'}"
type="Navigation"
press="onSearchListItemPressed"
iconDensityAware="false"
iconInset="false"/>
Other option I have tried is using a custom formatter:
<StandardListItem
title="{path: 'someTitle', type : 'formatter: 'zink.utils.StringFormatter.stringFormat''}"
description="{path: 'someDesc'}"
type="Navigation"
press="onSearchListItemPressed"
iconDensityAware="false"
iconInset="false"/>
The code of my custom formatter, StringFormatter.js looks like this:
sap.ui.define([
'sap/ui/model/type/String'
], function (String) {
"use strict";
var StringFormatter = {
stringFormat : function (v) {
return v.toString();
}
};
return StringFormatter;
}, /* bExport= */ true);
Anyway, it seems that the type change is done too late and therefore it has not impact on the filter. I would like to force the data type when binding the model, but I am not sure how to do that ...
Yes, the function is reached. As mentioned earlier in this thread, I have even changed all the vakues to "test", but that did not change the issue from occuring, which is why I want to change the data before binding of the values and then adding to the filter.
A far thought, could two-way binding perhaps help ...?
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.