imports/vx/client/code/ux.js
/**
     * Mutate a modifier to add either a set/unset instruction on behalf of a given component.
     *
     * @param {object} component Component with value to be considered.
     * @param {object} modifier Modifier to be mutated place.
     */
Mutate a modifier to add either a set/unset instruction on behalf of a given component.
@param {object} component Component with value to be considered.
@param {object} modifier Modifier to be mutated place.
Mutate a modifier to add either a set / unset instruction on behalf of a given component . @param { object } component Component with value to be considered . @param { object } modifier Modifier to be mutated place .
mutateModifier(component, modifier) {
        if (component.props.modifyHandler) {
            component.props.modifyHandler(component, modifier)
            return
        }
        let value = component.getValue()
        let dbName = component.props.dbName || component.props.id
        if (Util.isNullish(value)) {
            modifier.$unset = modifier.$unset || {}
            modifier.$unset[dbName] = ""
            return
        }
        modifier.$set = modifier.$set || {}
        modifier.$set[dbName] = value
    }
mutateModifier ( component , modifier ) { if ( component . props . modifyHandler ) { component . props . modifyHandler ( component , modifier ) return } let value = component . getValue ( ) let dbName = component . props . dbName || component . props . id if ( Util . isNullish ( value ) ) { modifier . $unset = modifier . $unset || { } modifier . $unset [ dbName ] = "" return } modifier . $set = modifier . $set || { } modifier . $set [ dbName ] = value }
Mutate a modifier to add either a set/unset instruction on behalf of a given component.
Mutate a modifier to add either a set / unset instruction on behalf of a given component .