Opened 7 years ago
Closed 7 years ago
#17794 closed defect (invalid)
dgrid editor Radio button column after Text editor column passes incorrect column when clicked
Reported by: | Frank Fortson | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | tbd |
Component: | General | Version: | 1.9.3 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
The attached test HTML file from the latest dgrid download should be installed in the dgrid/test directory.
The only change in the test HTML file is to add a Radio button editor column just after the Text column:
{ label: "Text", field: "text", editor: "text" }, { label: "Radio", field: "radio", editor: "radio" }, { label: "Checkbox", field: "bool", editor: "checkbox" }
The attached test editor.js file should temporarily replace the editor.js file in the dgrid directory. The only change to the test file is to include a console.log statement as the first statement in the setPropertyFromEditor function of editor.js.
function setPropertyFromEditor(grid, column, cmp, triggerEvent) {
console.log("* column.field=" + column.field+", cmp.name=" + cmp.name);
Within this function, both column and cmp values are used. The function also includes a test for a radio button column.
While viewing the test HTML file, click all or at least the first few radio buttons. This must be done before the next steps.
The console will display:
* column.field=text, cmp.name=radio << note the incorrect column is being supplied to the function. data changed: undefined -> true cell: 0 radio
Clicking the second and subsequent radio buttons replaces the left Text column's value with "false".
Clicking the first and subsequent checkboxes to the right of the radio button column sets the radio button on the same row to true/selected.
The console will display:
* column.field=text, cmp.name=bool << note the incorrect column is being supplied to the function. data changed: true -> false cell: 0 bool
The incorrect column is being passed to the setPropertyFromEditor function which causes the grid and store to reflect incorrect values for the Text column and the Radio and Checkbox columns.
- The problem seems to depend on having the Text column to the left of the radio button column.
- It also depends on having initially clicked the radio buttons in each row to be tested. Perhaps this initializes the radio editor?
- Thereafter, changing any column's editor value (slider, date, checkbox, etc.) on any of the rows in which the radio button has been previously clicked, sets the radio button on the preceding row to true/selected.
- Also, clicking a radio button replaces the Text column's value with "false" on the preceding row.
I could not find the cause for this.
Attachments (2)
Change History (3)
Changed 7 years ago by
Attachment: | editor_autosaveFBF.html added |
---|
comment:1 Changed 7 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
Sorry, but dgrid bugs need to be filed against https://github.com/SitePen/dgrid/issues.
Test HTML FIle