AdvancedDataGrid column sort can't be turned off
- Dominant language
- ActionScript
- Stars
- 380
- Forks
- 120
- PR merge metrics
- No merged PRs in 30d
Description
Hi Royale,
In mx.controls.beads.AdvancedDataGridSortBead in the mouseClickHandler when setting the column variable
event.target.data is always ~~null~~ _undefined_.
Setting the sortable property to false on a column causes this to matter.
When I changed it to event.target.element.parentElement.royale_wrapper.data _and I changed the boolean logic !col.sortable to col.sortable_ then it started working correctly.
I was going to open a PR, but my solution seems like it shouldn't work like that. I'm still trying to learn the framework, hopefully someone with more experience can explain maybe how it should work and I can make an attempt at a PR.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in mx.controls.beads.AdvancedDataGridSortBead, specifically mouseClickHandler, and inspect how event.target.data and the column's sortable property are used. Reproduce the issue with a column whose sortable property is false, then confirm that clicking it no longer enables sorting while sortable columns still work.
Written by the indexing model from the issue text.
Assessment
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100