function isMatchingPath(parentIndex, indexOrKey) {
            var pane = lxSelect.choicesViewSize === 'large' ? lxSelect.panes[parentIndex] : lxSelect.openedPanes[parentIndex];

            if (angular.isUndefined(pane)) {
                return;
            }

            var key = indexOrKey;
            if (angular.isObject(pane) && angular.isNumber(indexOrKey)) {
                key = (Object.keys(pane) || [])[indexOrKey];
            }

            if (parentIndex === 0) {
                return _findIndex(lxSelect.matchingPaths, key) !== -1;
            }

            var previous = toggledPanes[parentIndex - 1];
            if (angular.isUndefined(previous)) {
                return false;
            }

            return _findIndex(lxSelect.matchingPaths, previous.path + '.' + key) !== -1;
        }
Check if a path of a pane is matching the filter.

@param {number}        parentIndex The index of the pane.
@param {number|string} indexOrKey  The index or the name of the item to check.