-
Notifications
You must be signed in to change notification settings - Fork 8
Conversation
0ec05a6
to
128704c
Compare
const properties = await model.getProperties(); | ||
for (let i = 0; i < actionCallList.length; i++) { | ||
const overrideValue = | ||
properties.actions[i].value?.qStringExpression?.qExpr && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no idea what actionCallList
does but, do note that overrideValue
can become any falsy value. For example if qExpr === ''
, overrideValue
becomes an empty string.
Same for overrideVariable
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is actions
a required property on properties
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And does it always match the length of actionCallList
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is a couple of questions. In order:
- ActionCallList is the list of actions that need to run. Actions from actions get pushed into this array if they are found. Good catch. I'll look at that
- Yes it is.
- It does not have to match actually. Since we first try to find the actions from a list the actionCallList might be shorter than actions. This could happen if you create the button through the api. It also makes sure it is backwards compatible. Most important though is probably conversion from the old button. There are some actions that we do not support in the new if I remember correct
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed based on suggestion from Max. Also made sure that the actionCallList and actions list have the same length
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably change the title and a short description
Co-authored-by: Max Gefvert <max.gefvert@qlik.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No other comments from my side
Adding an options to have expression evaluate at runtime:
When this option is set the actions will run in order, but instead of using the expression values from the layout the expressions will be evaluated just before the action is run. This means that previous actions can impact the state for the next actions.