You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It makes the ModelEntry not fully general and inconvenient where other search criteria are needed.
Good example is binding to the first entry from the given model. Or binding to the first entry as a fallback when search by key fails or key is not provided.
The idea is to utilize filtering mechanism of SFPM (Filter interface).
The potential problem is IndexFilter must be enabled conditionally, otherwise first entry would be always selected. It causes (in the example) that when value is not empty but not found, fallback to first entry won't work.
Another possibility is to define separate fallbackFilter indended to be used when primary one fails to find entry:
Description
Currently the
ModelEntry
can find entry only by value of a specified role:It makes the
ModelEntry
not fully general and inconvenient where other search criteria are needed.Good example is binding to the first entry from the given model. Or binding to the first entry as a fallback when search by key fails or key is not provided.
The idea is to utilize filtering mechanism of
SFPM
(Filter
interface).The potential problem is
IndexFilter
must be enabled conditionally, otherwise first entry would be always selected. It causes (in the example) that when value is not empty but not found, fallback to first entry won't work.Another possibility is to define separate
fallbackFilter
indended to be used when primary one fails to find entry:Some other options should be considered as well, in order to provide simple but generic API.
The text was updated successfully, but these errors were encountered: