Hi, the gateway I’m using is version 8.1.14 (b2022012711)
If the issue was fixed in the 8.1.15 nightly release, please let me know.
I found a couple issues with the One Shot Button in perspective.
The first one is that it doesn’t seem to apply margins and padding when it’s a flex container (I haven’t tested it for other types of containers).
The other issue is that when the .props.confirm is set to true it will popup the confirmation box even if the button is not enabled. It doesn’t run the ActionPerformed script though, which is less concerning, but it still seems inconsistent to me that it would ask for confirmation if it’s not enabled, after all it wouldn’t be able to run the script anyways. I found a simple workaround for now, which is binding the confirm.enabled to the props.enabled.
I tried to reproduce the issue by creating a new button in a new view and it didn’t present the same behavior, so there might be something particular to this specific view. I exported the button alone and it still doing that, here’s the export file:
Have you edited the JSON of this component in any way? I found the root cause, but we’re all at a loss as to how the component reached the current state.
If you examine the JSON of the component, you’ll find this piece within props:
"confirm": {
"enabled": true
}
but that piece should not exist while the property has a binding configured, which you very much do. Further down the JSON witin the propConfig area you can see this:
We can’t explain how your component entered this state, but we can help you fix it. Please place a copy of the view.json file someplace safe in case you have any problems with the following steps.
Right-click your One-Shot button, and select “Copy”.
Open your favorite text editor, paste the contents of your clipboard, and then remove the following piece of code (INCLUDING THE PRECEDING COMMA):
Copy the ENTIRE JSON structure from your editor (Ctrl+A and then Ctrl+C).
I did what you mentioned, but that removed the confirmation function, and I still need it when it’s enabled. I’ve been trying to reproduce how the button got into this state and I think I found the actual culprit, it’s the icon (props.readyState.icon.path).
Here’s how to reproduce it in a few steps:
create a one-shot button
set props.confirm.enabled
set props.readyState.icon.path, for example as ‘material/remove’
Thank you so much! The call-out of the icon is exactly what we needed on our end to lock this down. I’ve opened an internal ticket to get this fixed, but I’m not able to provide an ETA. For now, binding the confirmation’s enabled state to the buttons’s enabled state is probably a good idea.
I have not had time to look at the margin issue yet - I prioritized what looked to be your “breaking” issue.
Has there been any activity on the margin bug? Noticing this is still present in 8.1.17.
Can be tough when using responsive layouts - you’re essentially backed in to using regular buttons for everything, which is a downgrade in terms of simple tag writes (especially those with confirmations).