-
Notifications
You must be signed in to change notification settings - Fork 601
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TagBox: Fix tag label display when valueExpr is set to function and hideSelectedItems is enabled (T1234032) (Draft) #27521
Closed
Closed
Changes from 10 commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
a96c801
Creaet Unit test
jdvictoria c8ad3b7
Apply fix
jdvictoria 92018f7
Create TestCafe test
jdvictoria b98b679
Refactor solution and tests
jdvictoria f5810dc
Fix labels
jdvictoria 10dc0f6
Fix label
jdvictoria 9227c71
Refactor solution
jdvictoria 875d1f5
reduce unnecessary data
jdvictoria dfd8a82
add runtime change test
jdvictoria d66f35b
refactor fix
jdvictoria 705f6a2
Merge branch 'DevExpress:24_1' into 24_1_TagBox_T1234032
jdvictoria 2287059
revert fix
jdvictoria 4ab4efc
refactor tests
jdvictoria 159d863
CI: Branch 24_2 (#27607)
alexslavr 7af7685
revert: Fix modules relative paths after moving Demos (#27563) (#2761…
EugeniyKiyashko 78b8425
Bump devextreme version (24.2.0) (#27608)
dxrobot 48e042b
DataGrid - Flickering of cell focus / revert button during DataGrid u…
pomahtri 8c3cc2c
Toolbar Adaptability: Fix demos and unskip Testcafe tests (Angular, R…
jdvictoria 7d73240
TabPanel/Overview: Corrected classname appending in Vue template by a…
nikkithelegendarypokemonster 3d5993e
TileView/Directions: Apply standardized width and added space between…
nikkithelegendarypokemonster 1fce2fe
Demos: update splits in descriptions (#27621) (#27622)
vladaskorohodova dfe964c
Fix list drag and drop demo (#27391) (#27635)
ivanblinov2k17 6b303b7
Documentation - Fix - Framework dependant desriptions missing (#27610…
ivanblinov2k17 b78b156
Fix demo tests (#27638)
williamvinogradov b551c25
TestCafe testing: Merge all pages for testing into one page (#27644)
Alyar666 39cc654
Fix React Drawer Component 24_2 (#27634)
tomodasheesh 293a37d
DataGrid - Dragged column from the column chooser is frozen when the …
Alyar666 8ffffcc
24_2 fix Vue warnings (#27624)
dxArtemiusz 7fe1eb5
chore: try remove some SSR-related workarounds (24_2) (#27645)
VasilyStrelyaev f1216d6
DataGrid - Summary values in the fixed column disappear when virtual …
pomahtri fdf0dcb
Merge branch 'DevExpress:24_2' into 24_1_TagBox_T1234032
jdvictoria File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6822,6 +6822,45 @@ QUnit.module('performance', () => { | |
assert.ok($.isFunction(filter), 'filter is function'); | ||
}); | ||
|
||
[false, true].forEach(changeAtRuntime => { | ||
QUnit.test(`tag labels should be correctly displayed with valueExpr as function and hideSelectedItems enabled ${changeAtRuntime ? 'at runtime' : ''} (T1234032)`, function(assert) { | ||
const dataSource = [ | ||
{ id: 1, scheme: 'schema 1', name: 'item1' }, | ||
{ id: 2, scheme: 'schema 2', name: 'item2' }, | ||
{ id: 3, scheme: 'schema 3', name: 'item3' }, | ||
]; | ||
|
||
const $tagBox = $('#tagBox').dxTagBox({ | ||
dataSource, | ||
valueExpr(x) { | ||
return x && x.name + ' ' + x.scheme; | ||
}, | ||
displayExpr: 'name', | ||
hideSelectedItems: !changeAtRuntime, | ||
opened: true, | ||
}); | ||
|
||
const tagBox = $tagBox.dxTagBox('instance'); | ||
const $list = tagBox._list.$element(); | ||
|
||
if(changeAtRuntime) { | ||
tagBox.option('hideSelectedItems', true); | ||
} | ||
|
||
$($list.find('.dx-list-item').eq(0)).trigger('dxclick'); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [repeatable code style mistake] Constants please! |
||
|
||
tagBox.open(); | ||
$($list.find('.dx-list-item').eq(0)).trigger('dxclick'); | ||
|
||
tagBox.open(); | ||
$($list.find('.dx-list-item').eq(0)).trigger('dxclick'); | ||
|
||
const $tagContainer = $tagBox.find(`.${TAGBOX_TAG_CONTAINER_CLASS}`); | ||
|
||
assert.strictEqual($.trim($tagContainer.text()), 'item1item2item3', 'label values are displayed correctly'); | ||
}); | ||
}); | ||
|
||
QUnit.test('loadOptions.filter should be correct when user filter is also used', function(assert) { | ||
const load = sinon.stub().returns([{ id: 1, text: 'item 1' }, { id: 2, text: 'item 2' }]); | ||
|
||
|
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[excess operation]
This condition is excess: if initially property is
true
, setting it totrue
at runtime will do nothing