imports/vx/client/code/ux.js
/**
     * Unmount a React modal that is contained within a specified anchor element.
     *
     * @param {object} anchorSelector Anchor jQuery selector.
     */
Unmount a React modal that is contained within a specified anchor element.
@param {object} anchorSelector Anchor jQuery selector.
Unmount a React modal that is contained within a specified anchor element . @param { object } anchorSelector Anchor jQuery selector .
unmountModal(anchorSelector) {
        anchorSelector = anchorSelector || "#vx-anchor"
        const anchorId = anchorSelector.substr(1)
        const modalCount = $(anchorSelector).children().length
        const modalContainerId = `${anchorId}-${modalCount}`
        const success = ReactDOM.unmountComponentAtNode($(`#${modalContainerId}`)[0])
        $(`#${modalContainerId}`).remove()
        OLog.warn(`ux.js unmountModal modalContainerId=${modalContainerId} ReactDOM.unmountComponentAtNode success=${success}`)
    }
unmountModal ( anchorSelector ) { anchorSelector = anchorSelector || "#vx-anchor" const anchorId = anchorSelector . substr ( 1 ) const modalCount = $ ( anchorSelector ) . children ( ) . length const modalContainerId = ` ${ anchorId } ${ modalCount } ` const success = ReactDOM . unmountComponentAtNode ( $ ( ` ${ modalContainerId } ` ) [ 0 ] ) $ ( ` ${ modalContainerId } ` ) . remove ( ) OLog . warn ( ` ${ modalContainerId } ${ success } ` ) }
Unmount a React modal that is contained within a specified anchor element.
Unmount a React modal that is contained within a specified anchor element .