Skip to content

Commit 877579c

Browse files
pandayonkaputnik
andauthored
Disable Facet with annotation (#86)
Hello everyone, with this patch I suggest adding the annotation `@changelog.disable_facet` to disable the facet on an entity completely. This might be useful if we have deep fiori UIs where a lot of the entities are tracked. Depending on the configuration, I want all of them tracked on the main entity, yet empty facets are shown on the subpages anyway. Have a nice weekend and feel free to ask questions. Kind regards --------- Co-authored-by: Nick Josipovic <[email protected]>
1 parent 5c11089 commit 877579c

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,10 @@ annotate sap.changelog.aspect @(UI.Facets: [{
227227

228228
The system now uses the SAPUI5 default setting `![@UI.PartOfPreview]: true`, such that the table will always shown when navigating to that respective Object page.
229229

230+
### Disable Facet
231+
232+
To not show the changelog facet on compositions subsites, you can use `@changelog.disable_facet` for the facet to not show up.
233+
230234

231235
## Modelling Samples
232236

cds-plugin.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ cds.on('loaded', m => {
5858
}
5959

6060
// Add UI.Facet for Change History List
61-
entity['@UI.Facets']?.push(facet)
61+
if(!entity['@changelog.disable_facet'])
62+
entity['@UI.Facets']?.push(facet)
6263

6364
// The changehistory list should be refreshed after the custom action is triggered
6465
if (entity.actions) {

0 commit comments

Comments
 (0)