Flask-AppBuilder icon indicating copy to clipboard operation
Flask-AppBuilder copied to clipboard

Action confirmation parameter should be clearer

Open levnikmyskin opened this issue 6 years ago • 1 comments

This is not really a bug, but to me it looks like the action confirmation parameter is not very clear:

  • From the docs, it looks like we have to pass None if we want to disable confirmation;
  • In the source code, confirmation defaults to None as well.

However, since the confirmation is rendered as a string when passed to Javascript, the confirmation dialog will appear nonetheless, like in this screenshot: action_confirmation_none

The solution is to use an empty string for the confirmation parameter, eg:

@action("some string", "some string", confirmation="")  

Imo, this is not very clear (and took me quite some time to figure it out). It could be possible to change the confirmation default to an empty string and also change the documentation. I can address this issue, just let me know if this looks reasonable to you.

levnikmyskin avatar Dec 28 '19 13:12 levnikmyskin

@levnikmyskin, yes looks very reasonable to me, thank you

dpgaspar avatar Jan 02 '20 10:01 dpgaspar