Skip to content

Allow selector-only template columns to enter edit mode#400

Open
w-ahmad with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-editingtemplate-selector-issue
Open

Allow selector-only template columns to enter edit mode#400
w-ahmad with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-editingtemplate-selector-issue

Conversation

Copilot AI commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

TableViewTemplateColumn already supports EditingTemplateSelector when generating the editing element, but TableViewCell.IsReadOnly still treated template columns without EditingTemplate as non-editable. As a result, selector-only editing templates were blocked before the edit path could run.

  • Read-only gate

    • Update TableViewCell.IsReadOnly so TableViewTemplateColumn is considered read-only only when both EditingTemplate and EditingTemplateSelector are unset.
    • Preserve existing behavior for table-level and column-level read-only settings.
  • Regression coverage

    • Add a focused test for a TableViewCell bound to a TableViewTemplateColumn that sets only EditingTemplateSelector.
    • Verify the cell is not marked read-only in that configuration.
  • Behavioral impact

    • Align the editability check with the existing editing-element generation logic.
    • Remove the need for the empty-DataTemplate workaround.
public bool IsReadOnly => TableView?.IsReadOnly is true
                          || Column is TableViewTemplateColumn
                          {
                              EditingTemplate: null,
                              EditingTemplateSelector: null
                          }
                          or { IsReadOnly: true };

Copilot AI changed the title [WIP] Fix EditingTemplateSelector usage without EditingTemplate Allow selector-only template columns to enter edit mode Jul 5, 2026
Copilot AI requested a review from w-ahmad July 5, 2026 15:51
@w-ahmad w-ahmad marked this pull request as ready for review July 5, 2026 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot use EditingTemplateSelector without also using EditingTemplate

2 participants