Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export const filterByRating = (rating, paginationMetadata) => {
const filter = {
formValues: { rating },
operators: { rating: FILTER_OPERATORS.GREATER_THAN },
};
return applyFilter(filter, paginationMetadata);
};
import { connect } from 'react-redux';
import { convertToQueryString, FILTER_OPERATORS, formattedText } from '@entando/utils';
import { fetchWidgetList } from 'state/widgets/actions';
import { fetchPlugins, fetchFragments } from 'state/fragments/actions';
import FragmentSearchForm from 'ui/fragments/list/FragmentSearchForm';
import { getWidgetTypesOptions, getPluginsOptions } from 'state/fragments/selectors';
const FIELD_OPERATORS = {
code: FILTER_OPERATORS.EQUAL,
widgetType: FILTER_OPERATORS.GREATER_THAN,
plugin: FILTER_OPERATORS.LIKE,
};
export const mapStateToProps = state => ({
widgetTypes: getWidgetTypesOptions(state),
plugins: getPluginsOptions(state),
});
export const mapDispatchToProps = dispatch => ({
onWillMount: () => {
dispatch(fetchWidgetList());
dispatch(fetchPlugins());
},
onSubmit: (values) => {