Commit 54b43191 authored by Matija Obreza's avatar Matija Obreza

Merge branch '716-filters-applied-snack-bar-on-the-dashboard-s-publishers' into 'master'

Fix: Filters applied snack bar on the dashboard`s publishers

Closes #716

See merge request genesys-pgr/genesys-ui!694
parents 95d83946 837d40fb
......@@ -28,8 +28,8 @@ interface IDescriptorListProps extends React.ClassAttributes<any> {
history: any;
pagination?: Pagination<DescriptorFilter>;
matchingDescriptors: Page<Descriptor>;
listAccessibleDescriptors: (page?: IPageRequest, filter?: DescriptorFilter) => void;
moreAccessibleDescriptors: (paged?: FilteredPage<Descriptor>, filter?: string | DescriptorFilter) => void;
listAccessibleDescriptors: (page?: IPageRequest, filter?: DescriptorFilter) => Promise<FilteredPage<Descriptor>>;
moreAccessibleDescriptors: (paged?: FilteredPage<Descriptor>, filter?: string | DescriptorFilter) => Promise<FilteredPage<Descriptor>>;
clearDescriptors: () => void;
addDescriptorToDescriptorList: any;
addDescriptorsToDescriptorList: (descriptorList: DescriptorList, descriptorUuids: string[]) => void;
......
......@@ -24,8 +24,8 @@ interface IDescriptorPickerProps extends React.ClassAttributes<any>, WithTransla
classes: any;
history: any;
location: any;
loadDescriptors: (page?: IPageRequest, filter?: DescriptorFilter | string) => void;
loadMoreDescriptors: (paged?: FilteredPage<Descriptor>) => void;
loadDescriptors: (page?: IPageRequest, filter?: DescriptorFilter | string) => Promise<FilteredPage<Descriptor>>;
loadMoreDescriptors: (paged?: FilteredPage<Descriptor>) => Promise<FilteredPage<Descriptor>>;
clearDescriptors: () => void;
matchingDescriptors: FilteredPage<Descriptor>; // results from loadDescriptors
onAddDescriptor: (descriptor: Descriptor) => void; // event handler
......@@ -98,7 +98,8 @@ class DescriptorPicker extends React.Component<IDescriptorPickerProps, any> {
log('Applying new filter', newFilters);
showSnackbar('common.snackbar.applyingFilters');
loadDescriptors({ page: pagination.page, size: pagination.size, properties: pagination.sort as string[], direction: pagination.dir as SortDirection }, newFilters);
loadDescriptors({ page: pagination.page, size: pagination.size, properties: pagination.sort as string[], direction: pagination.dir as SortDirection }, newFilters)
.then(() => showSnackbar('common.snackbar.filtersApplied'));
}
private onDescriptorSelected = (select) => (descriptor: Descriptor) => {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment