-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
M2.2.0 Admin Grid column ordering/positioning not working when single store mode set On #12070
Comments
@gwharton, thank you for your report. |
Same for products grid. |
This issue still persists |
@gwharton Have you figured out a temporary fix? |
Nope, and it is annoying the heck out of me at the moment. Seems that column positioning doesnt work regardless of whether single store mode is on or off now. This seems a recent change in the latest version. |
I'm working on #cd-balance |
@pavelshulga thank you for joining. Please accept team invitation here and self-assign the issue. |
Hi @gwharton. Thank you for your report. The fix will be available with the upcoming 2.2.8 release. |
Preconditions
Steps to reproduce
INITIAL FINDINGS
When Magento creates an admin grid, it calls
Magento_Ui/js/grid/listing.js::initElement($item)
for each column in the grid.
This function calculates totalCount to be the total number of columns available to be added and currentCount to be the current number of columns added. currentCount increases as each column is added, until currentCount==totalCount at which point it triggers the call to enable and apply positioning data for the columns, as as far as it knows, all columns have now been added.
When single store mode is set to yes the "Purchase Point" column is hidden and cannot be selected, however the value of totalCount in the above function still includes the Purchase Point column. When the columns are added to the grid, the purchase point column is skipped and we reach the situation that we never get to the point of currentCount==totalCount and the positioning calls are never called. We always fall 1 column short of triggering the positioning calls.
Effectively we have
Single Store mode = yes
Visible columns = 19
totalCount = 20
Columns added to grid = 19
Positioning is not triggered as currentCount never reaches totalCount
Single Store mode = no
Visible columns = 20
totalCount = 20
Columns added to grid = 20
Positioning is triggered
The text was updated successfully, but these errors were encountered: