Skip to content

Column Management Modal retains unapplied checkbox changes on Cancel #942

Description

@rh-gvincent

Go to the documentation page: https://www.patternfly.org/extensions/component-groups/column-management-modal

Click the Manage Columns button.

Uncheck all columns

Click the Cancel button (or the 'X' close icon).

Click the Manage Columns button again.

Actual Results: All the columns you unchecked in Step 3 are still unchecked, even though the changes were canceled and never applied

Expected Results: The modal should reset its state on close/cancel. Reopening the modal should show the original


Jira Issue: PF-4266

Activity

  1. rh-gvincent commented on Jun 30, 2026

    @rh-gvincent
    Author

    Looking at the test, I noticed this:

    it('should retain columns on cancel', () => {
      fireEvent.click(screen.getByText('Impact'));
      fireEvent.click(screen.getByText('Cancel'));
    
      expect(onClose).toHaveBeenCalled();
      // applyColumns should NOT be called on cancel
      expect(setColumns).not.toHaveBeenCalled();
    });
    

    Is this behavior intentional?

    I would expect clicking Cancel (or closing the dialog) to discard any pending changes and restore the initial state. But maybe the original design was intentionally different?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions