List: Allow selection/highlighting of text in an item [QW] \ Implementation#32840
Open
dmlvr wants to merge 4 commits intoDevExpress:26_1from
Open
List: Allow selection/highlighting of text in an item [QW] \ Implementation#32840dmlvr wants to merge 4 commits intoDevExpress:26_1from
dmlvr wants to merge 4 commits intoDevExpress:26_1from
Conversation
Contributor
There was a problem hiding this comment.
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
_swipeEnabledoption from ListBase and stopped passing it from Scheduler tooltip list creation. - Updated ListBase to attach swipe event handlers only when
onItemSwipeis 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. |
packages/devextreme/testing/tests/DevExpress.ui.widgets/listParts/commonTests.js
Outdated
Show resolved
Hide resolved
packages/devextreme/testing/tests/DevExpress.ui.widgets/listParts/commonTests.js
Show resolved
Hide resolved
packages/devextreme/testing/tests/DevExpress.ui.widgets/listParts/commonTests.js
Show resolved
Hide resolved
pharret31
reviewed
Mar 11, 2026
|
|
||
| return result; | ||
| } | ||
|
|
Contributor
There was a problem hiding this comment.
are there any tests that checks resubscriptions in existing tests?
Contributor
Author
There was a problem hiding this comment.
we have test which checks onItemSwipe subscription by on method
| }); | ||
| } | ||
|
|
||
| _onItemSwipeSubscriptionChanged(): void { |
Contributor
There was a problem hiding this comment.
_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;
}
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.