Currently, the Hide method fails due to an ArgumentNullException: Value cannot be null. (Parameter 'jsObjectReference') because the _jsModule is not initialized.
If we add EnsureJsModule(), the error is resolved, but the offcanvas remains open (as the Show method is delayed until OnAfterRender).
...we need to adopt a unified approach like RegisterOnAfterRenderAction() to enable sequential calls to JavaScript methods.
(real scenario: doubleclicking a toggle button)
Reproduction steps:
Hide
method fails due to anArgumentNullException: Value cannot be null. (Parameter 'jsObjectReference')
because the_jsModule
is not initialized.EnsureJsModule()
, the error is resolved, but the offcanvas remains open (as theShow
method is delayed untilOnAfterRender
)....we need to adopt a unified approach like
RegisterOnAfterRenderAction()
to enable sequential calls to JavaScript methods.cc @Arnnes