Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CollectionContainer should have a sorter by default #2074

Closed
knstvk opened this issue Apr 17, 2019 · 0 comments
Closed

CollectionContainer should have a sorter by default #2074

knstvk opened this issue Apr 17, 2019 · 0 comments
Assignees
Labels
state: fixed Fixed by the developer type: enhancement New feature or request ver: 7.1.0 Fixed in version
Milestone

Comments

@knstvk
Copy link
Member

knstvk commented Apr 17, 2019

Environment

  • Platform version: 7.0

Description of the bug or enhancement

Now if a CollectionContainer is not connected to a loader, it has no Sorter, which means a connected table is not sorted when user clicks on headers.

To reproduce, define an additional container in a screen, connect to a table and fill:

@Inject
private CollectionContainer<Customer> copyDc;
@Inject
private CollectionContainer<Customer> customersDc;

@Subscribe(id = "customersDc", target = Target.DATA_CONTAINER)
private void onCustomersDcCollectionChange(CollectionContainer.CollectionChangeEvent<Customer> event) {
    copyDc.setItems(customersDc.getItems());
}

// this is required to make sorting work
@Subscribe
private void onInit(InitEvent event) {
    copyDc.setSorter(new CollectionContainerSorter(copyDc, null));
}
@knstvk knstvk added the type: enhancement New feature or request label Apr 17, 2019
@knstvk knstvk added this to the Release 7.1 milestone Apr 17, 2019
@knstvk knstvk self-assigned this Apr 17, 2019
@haulmont-git haulmont-git added the ver: 7.1.0 Fixed in version label Apr 23, 2019
@knstvk knstvk assigned natfirst and unassigned natfirst Apr 23, 2019
@myatlevEvg myatlevEvg self-assigned this May 27, 2019
@myatlevEvg myatlevEvg added the state: fixed Fixed by the developer label May 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state: fixed Fixed by the developer type: enhancement New feature or request ver: 7.1.0 Fixed in version
Projects
None yet
Development

No branches or pull requests

4 participants