DisplayLogic of Panel is not working #566
Labels
Area: Frontend
Priority:Important
Issues & PRs that are important; broken functions; errors; there are workarounds
Severity: Moderate
Minor Impact
Type: Bug
Something isn't working
Issue
I've followed the example in SuiteCRM8 documentation for controlling displayLogic, but it seems to me that it currently does not work.
(https://docs.suitecrm.com/8.x/developer/extensions/frontend/logic/panel-logic/fe-extensions-dynamic-panels/)
I think that Panel component somehow does not get any information about display information:
As we can observe in the above code snippet, the panel.component.html does not have any variable to control the display of the Panel component.
The displayLogic we set in backend def file somehow get passed to PanelLogicManager component and the PanelLogicManager component determines 'displayState' of a panel using the user-defined displayLogic.
However, the panel.displayState is currently never passed to actual Panel component (panel of panel.displayState is a panel as a data structure).
Possible Fix
I think Panel component needs to have 'displayState' observable like 'isCollapsed' observable in Panel component so that the Panel component can detect and keep 'displayState' up-to-date. Then, Panel component needs to use the 'displayState' in panel.component.html to determine the display status of Panel component.
Steps to Reproduce the Issue
According to an example in the documentation (https://docs.suitecrm.com/8.x/developer/extensions/frontend/logic/panel-logic/fe-extensions-dynamic-panels/), One can do
Context
No response
Version
8.7
What browser are you currently using?
Chrome
Browser Version
No response
Environment Information
MySQL, PHP8.1
Operating System and Version
Ubuntu23.10
The text was updated successfully, but these errors were encountered: