How to use the action-creators.requestLocation function in action-creators

To help you get started, we’ve selected a few action-creators examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github noobaa / noobaa-core / frontend / src / app / components / shared / host-parts-table / host-parts-table.js View on Github external
_query(query) {
        const {
            pageSize = this.pageSize(),
            page = this.page()
        } = query;

        const url = realizeUri(this.pathname, null, { page, pageSize });
        this.dispatch(requestLocation(url));
    }
}
github noobaa / noobaa-core / frontend / src / app / components / shared / resource-distribution-table / resource-distribution-table.js View on Github external
_query(params) {
        const {
            page = this.page(),
            pageSize = this.pageSize(),
            sortBy = this.sorting().sortBy,
            order = this.sorting().order
        } = params;

        const url = realizeUri(this.pathname, null, { page, pageSize, sortBy, order });
        this.dispatch(requestLocation(url));
    }
github noobaa / noobaa-core / frontend / src / app / components / object / object-parts-list / object-parts-list.js View on Github external
_query(query) {
        const {
            part = this.selectedPart(),
            page = this.page(),
            pageSize = this.pageSize()
        } = query;

        const url = realizeUri(this.pathname, null, {
            part: part !== '' ? part : undefined,
            page,
            pageSize
        });
        this.dispatch(requestLocation(url));
    }
}
github noobaa / noobaa-core / frontend / src / app / components / bucket / bucket-s3-access-table / bucket-s3-access-table.js View on Github external
onSort(sorting) {
        const query = ko.deepUnwrap(sorting);
        const url = realizeUri(this.pathname, {}, query);
        action$.next(requestLocation(url));
    }
github noobaa / noobaa-core / frontend / src / app / components / host / host-parts-table / host-parts-table.js View on Github external
onPage(page) {
        const nextPageUri = realizeUri(this.baseRoute, {}, { page });
        action$.next(requestLocation(nextPageUri));
    }
}
github noobaa / noobaa-core / frontend / src / app / actions.js View on Github external
export function redirectTo(route = model.routeContext().pathname, params = {}, query = {}) {
    logAction('redirectTo', { route, params, query });

    const uri = realizeUri(route, Object.assign({}, model.routeContext().params, params), query);
    action$.next(requestLocation(uri, true));
}

action-creators

Redux action creators with logging and validation

MIT
Latest version published 7 years ago

Package Health Score

42 / 100
Full package analysis