You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you add GridFieldEditableColumns to a GridField, the default behaviour is that it disables the "click to edit" functionality for that row. Instead, you either choose "Edit" from the more actions dropdown, or the standalone "Edit" button if you don't have any other actions.
This RFC is to discuss whether to re-enable the click handler for the row, so that clicking anywhere in the row it would take you to the edit form for that row as usual in a GridField. Exclusions would be when clicking on anything in the row that has its own click handling, e.g. the drag handle for reordering if you're using GridFieldOrderableRows, an editable form field, a GridField action such as "Edit" or "Delete" or an inline link in the text if you're using GridFieldDataColumns or something to add links into the row text.
I think it should at least be an option. I believe the more common use case for this GridField component is to have a fairly substantial in-line form, but our use case (of just two tickboxes) means that not having the click handler feels weird.
/**
* GridFieldEditableColumns
*/
/* MINUS : $('.ss-gridfield-editable .ss-gridfield-item').entwine({ */
/* PLUS : */ $('td').entwine({
onclick: function(e) {
// Prevent the default row click action when clicking a cell that contains a field
if (this.find('.editable-column-field').length) {
e.stopPropagation();
}
}
});
Context: SilverStripe 4.3.0
When you add GridFieldEditableColumns to a GridField, the default behaviour is that it disables the "click to edit" functionality for that row. Instead, you either choose "Edit" from the more actions dropdown, or the standalone "Edit" button if you don't have any other actions.
This RFC is to discuss whether to re-enable the click handler for the row, so that clicking anywhere in the row it would take you to the edit form for that row as usual in a GridField. Exclusions would be when clicking on anything in the row that has its own click handling, e.g. the drag handle for reordering if you're using GridFieldOrderableRows, an editable form field, a GridField action such as "Edit" or "Delete" or an inline link in the text if you're using GridFieldDataColumns or something to add links into the row text.
cc @sachajudd
The text was updated successfully, but these errors were encountered: