Skip to content

List: Allow selection/highlighting of text in an item [QW] \ Implementation#32840

Open
dmlvr wants to merge 4 commits intoDevExpress:26_1from
dmlvr:26_1_3648_list_highlighting_text_of_the_items
Open

List: Allow selection/highlighting of text in an item [QW] \ Implementation#32840
dmlvr wants to merge 4 commits intoDevExpress:26_1from
dmlvr:26_1_3648_list_highlighting_text_of_the_items

Conversation

@dmlvr
Copy link
Contributor

@dmlvr dmlvr commented Mar 10, 2026

No description provided.

@dmlvr dmlvr self-assigned this Mar 10, 2026
@dmlvr dmlvr added the 26_1 label Mar 10, 2026
@dmlvr dmlvr requested a review from a team as a code owner March 10, 2026 08:28
Copilot AI review requested due to automatic review settings March 10, 2026 08:28
@dmlvr dmlvr requested a review from a team as a code owner March 10, 2026 08:28
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adjusts dxList swipe wiring to better support use cases like text selection within list items by removing the internal _swipeEnabled switch and only attaching swipe listeners when there is an onItemSwipe subscription. It also updates Scheduler tooltip list options/tests accordingly.

Changes:

  • Removed the internal _swipeEnabled option from ListBase and stopped passing it from Scheduler tooltip list creation.
  • Updated ListBase to attach swipe event handlers only when onItemSwipe is subscribed.
  • Updated affected QUnit tests to reflect the new options shape (and attempted to update a swipe-related List test).

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
packages/devextreme/testing/tests/DevExpress.ui.widgets/listParts/commonTests.js Updates a List swipe test (currently inconsistent with actual options/behavior).
packages/devextreme/testing/tests/DevExpress.ui.widgets.scheduler/desktopTooltip.tests.js Updates assertions for Scheduler tooltip List options after removing _swipeEnabled.
packages/devextreme/js/__internal/ui/list/list.base.ts Removes _swipeEnabled and changes swipe listener attachment to depend on action subscription.
packages/devextreme/js/__internal/scheduler/tooltip_strategies/m_tooltip_strategy_base.ts Stops passing _swipeEnabled: false into tooltip List options.

Copilot AI review requested due to automatic review settings March 10, 2026 13:50
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.


return result;
}

Copy link
Contributor

@pharret31 pharret31 Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are there any tests that checks resubscriptions in existing tests?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we have test which checks onItemSwipe subscription by on method

QUnit.test('onItemSwipe - subscription by on method', function(assert) {

});
}

_onItemSwipeSubscriptionChanged(): void {
Copy link
Contributor

@EugeniyKiyashko EugeniyKiyashko Mar 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

 _attachSwipeEvent($itemElement: dxElementWrapper): void {
    // @ts-expect-error ts-error
    const endEventName = addNamespace(swipeEventEnd, this.NAME);
    eventsEngine.off($itemElement, endEventName);

    if (this.hasActionSubscription('onItemSwipe')) {
      eventsEngine.on($itemElement, endEventName, (e) => {
        this._itemSwipeEndHandler(e);
      });
    }
  }

  on(eventName: string | { [key: string]: Function }, eventHandler?: Function): this {
    const result = super.on(eventName, eventHandler);

    if (eventName === 'itemSwipe') {
      const $items = this._itemElements();

      this._attachSwipeEvent($items);
    }

    return result;
  }

  off(eventName: string, eventHandler?: Function): this {
    const result = super.off(eventName, eventHandler);

    if (eventName === 'itemSwipe') {
      const $items = this._itemElements();

      this._attachSwipeEvent($items);
    }

    return result;
  }

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants