Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function onChangeSearchAction(
environmentId: string,
currentQuery: Query,
repository: Repository,
selectedOption: string,
) {
const clonedQuery = cloneDeep(currentQuery);
const filterData = splitQueryValue(selectedOption);
clonedQuery
.sortBy(Apisearch
.createEmptySortBy()
.byFieldValue(
filterData.field,
filterData.sort,
),
);
clonedQuery.page = 1;
const dispatcher = container.get(`${APISEARCH_DISPATCHER}__${environmentId}`);
repository
.query(clonedQuery)
.then((result) => {
dispatcher.dispatch({
type: "RENDER_FETCHED_DATA",
payload: {