Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions app/featureShowcase/layouts_RootEntities.cds
Original file line number Diff line number Diff line change
Expand Up @@ -622,6 +622,7 @@ annotate service.RootEntities with @(
annotate service.RootEntities with @(
//Shown filters for the given fields after opening the application
UI.SelectionFields : [
country_code,
stringProperty,
fieldWithPrice,
criticality_code,
Expand Down Expand Up @@ -698,6 +699,32 @@ annotate service.RootEntities with @(
Visualizations : ['@UI.LineItem#simplified'],
},
},
UI.SelectionPresentationVariant #DefaultFilter : {
SelectionVariant : {
SelectOptions : [
{
PropertyName : country_code,
Ranges : [
{
Sign : #I,
Option : #EQ,
Low : 'DE',
},
{
Sign : #I,
Option : #EQ,
Low : 'FR',
},
],
},
],
},
PresentationVariant : {
SortOrder : [
],
Visualizations : ['@UI.LineItem'],
},
},
);

/**
Expand Down
3 changes: 2 additions & 1 deletion app/featureShowcase/webapp/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@
"entitySet": "RootEntities",
"variantManagement": "Page",
"enhanceI18n": "i18n/customI18N.properties",
"defaultTemplateAnnotationPath": "com.sap.vocabularies.UI.v1.SelectionPresentationVariant#DefaultFilter",
"navigation": {
"RootEntities": {
"detail": {
Expand All @@ -119,7 +120,7 @@
}
},
"initialLoad": true,
"views": {
"XviewsX": {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not be here, but having both active at the same time crashes the app.

"paths": [
{
"key": "tab1",
Expand Down