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

Action EnabledRule is unaccounted in Table without loading data (port to 1.x) #3907

Open
Flamesson opened this issue Nov 20, 2024 · 1 comment
Labels

Comments

@Flamesson
Copy link
Contributor

Flamesson commented Nov 20, 2024

Environment

Jmix version: 1.6.0 (reproduces for 1.6.1 too)

Bug Description

Some actions of io.jmix.ui.component.Table are in incorrect state at io.jmix.ui.screen.Screen#AfterShowEvent if there was no data loading. User can click buttons which must be disabled according to related action's EnabledRule-s.

May be the same problem exists for DataGrid.

Steps To Reproduce

Run sample project: https://github.com/izumi-jmix/actions-loading.
Follow steps from README.md file of the sample project.

Current Behavior

My opinion:

  1. Screen XML is loading
  2. Table XML is loading
  3. Actions are loaded. Their state is refreshed.
  4. Table data is bound. Actions state is refreshed.
  5. Screen XML is loaded.
  6. Screen injection happens. Annotated methods from controller are handled. Handled actions state is not refreshed.
  7. Screen is shown.

Expected Behavior

  1. Screen XML is loading
  2. Table XML is loading
  3. Actions are loaded. Their state is refreshed.
  4. Table data is bound. Actions state is refreshed.
  5. Screen XML is loaded.
  6. Screen injection happens. Annotated methods from controller are handled. Handled actions state is refreshed.
  7. Screen is shown.

Sample Project

https://github.com/izumi-jmix/actions-loading

@Flamesson Flamesson added triage Issue is waiting for triage type: bug Something isn't working labels Nov 20, 2024
@glebfox glebfox added size: S and removed triage Issue is waiting for triage labels Nov 22, 2024
@github-project-automation github-project-automation bot moved this to Backlog in Release 1.6 Nov 22, 2024
@glebfox glebfox removed this from Release 1.6 Nov 22, 2024
@glebfox glebfox removed the type: bug Something isn't working label Nov 22, 2024
@glebfox
Copy link
Contributor

glebfox commented Nov 22, 2024

Proposed solution: call refreshAction when enabledRule is added.

@glebfox glebfox added in: ui ver: 1 Jmix version 1.x labels Nov 22, 2024
@glebfox glebfox changed the title Action EnabledRule is unaccounted in Table without loading data Action EnabledRule is unaccounted in Table without loading data (port to 1.x) Nov 22, 2024
@glebfox glebfox added backport Port to release branch and removed backport Port to release branch labels Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants