Supporting code
As you may have noticed, the preceding code has two issues, both relating to the Quit button. Firstly, the func() that's called does not actually exit the application. This is a current limitation of the Shiny lifecycle code. It can be worked around with a custom lifecycle, but this is not recommended due to the large amount of code that would be required. Secondly, you may notice that newButton() is a local function and not part of the widget package. One of the widgets currently missing from the toolkit list is a standard button, therefore, we must define one ourselves. This can be done by adding the code described as follows:
First, we define the custom node; it must begin by inheriting from node.LeafEmbed. We add fields ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access