Skip to content
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

Select falsy values via ngModel - 14.1.x #12096

Merged
merged 26 commits into from
Oct 6, 2022
Merged

Conversation

RivaIvanova
Copy link
Member

@RivaIvanova RivaIvanova commented Sep 19, 2022

Closes #12048

NOTE FOR TESTING :

  • Should be able to select all falsy values except 'undefined', i.e., false, '', 0, NaN, null.

  • For complex data, if there is an item with valueKey=undefined it should be displayed in the dropdown, but cannot be selected.

  • When testing NaN use an additional variable in the ts file

public selectNaN: any = NaN;

<igx-simple-combo [data]="data" [(ngModel)]="selectedValue"></igx-simple-combo>
<button igxButton (click)="selectedValue = selectNaN"> NaN </button>

Assigning it directly in the html file shows an error "Property 'NaN' does not exist on type 'ComboSampleComponent'.ngtsc(2339)" and the variable bound to the ngModel is assumed as 'undefined'.

Screenshot (8)

  • Test IgxSimpleCombo when bound to the ngModel with required attribute set:
    • if required attribute is set, null, undefined, '' should not be selected in IgxSimpleCombo, otherwise, null, '' should be selected.

Additional information (check all that apply):

  • Bug fix
  • New functionality
  • Documentation
  • Demos
  • CI/CD

Checklist:

  • All relevant tags have been applied to this PR
  • This PR includes unit tests covering all the new code (test guidelines)
  • This PR includes API docs for newly added methods/properties (api docs guidelines)
  • This PR includes feature/README.MD updates for the feature docs
  • This PR includes general feature table updates in the root README.MD
  • This PR includes CHANGELOG.MD updates for newly added functionality
  • This PR contains breaking changes
  • This PR includes ng update migrations for the breaking changes (migrations guidelines)
  • This PR includes behavioral changes and the feature specification has been updated with them

Sorry, something went wrong.

@MonikaKirkova MonikaKirkova added 💥 status: in-test PRs currently being tested ✅ status: verified Applies to PRs that have passed manual verification and removed ❌ status: awaiting-test PRs awaiting manual verification 💥 status: in-test PRs currently being tested labels Sep 19, 2022
@RivaIvanova RivaIvanova added 🛠️ status: in-development Issues and PRs with active development on them and removed ✅ status: verified Applies to PRs that have passed manual verification labels Sep 20, 2022
@RivaIvanova RivaIvanova added ❌ status: awaiting-test PRs awaiting manual verification and removed 🛠️ status: in-development Issues and PRs with active development on them labels Sep 21, 2022
@RivaIvanova RivaIvanova changed the title [IgxSimpleCombo] Select falsy values - 14.1.x Select falsy values via ngModel - 14.1.x Sep 26, 2022
jackofdiamond5
jackofdiamond5 previously approved these changes Sep 26, 2022
@jackofdiamond5 jackofdiamond5 added the squash-merge Merge PR with "Squash and Merge" option label Sep 26, 2022
@RivaIvanova RivaIvanova added 🛠️ status: in-development Issues and PRs with active development on them and removed ❌ status: awaiting-test PRs awaiting manual verification labels Sep 29, 2022
@RivaIvanova RivaIvanova added ❌ status: awaiting-test PRs awaiting manual verification and removed 🛠️ status: in-development Issues and PRs with active development on them labels Sep 29, 2022
@teodosiah teodosiah added 💥 status: in-test PRs currently being tested ✅ status: verified Applies to PRs that have passed manual verification and removed ❌ status: awaiting-test PRs awaiting manual verification 💥 status: in-test PRs currently being tested labels Oct 5, 2022
@ChronosSF ChronosSF merged commit 08d4719 into 14.1.x Oct 6, 2022
@ChronosSF ChronosSF deleted the rivanova/fix-12048-14.1.x branch October 6, 2022 06:25
ChronosSF pushed a commit that referenced this pull request Oct 19, 2022
* chore(*): updating angular/core and cli deps

* chore(*): updating other deps

* chore(*): updating typescript

* chore(*): fixing package version

* chore(deps): removing ^ from typedoc version

* chore(*): fixing indentation in dd tests

* chore(*): updating dependencies

* chore(*): updating tests.ts

* chore(*): updating dependencies

* fix(excel-exporter): export correct number of rows#12086 (#12121)

* fix(excel-exporter): export correct number of rows#12086

* fix(excel-exporter): fix total rowCount with multi col headers#12086

* fix(excel-exporter): fix spacing#12086

* fix(i18n): Updating Grid localization for all languages - 14.1.x

* fix(igxGrid): Fix end edit with Enter when trigger is blur by moving it to more common place. (#12101)

Co-authored-by: MKirova <MKirova@DEV-MKIROVA>
Co-authored-by: Deyan Kamburov <dkamburov@users.noreply.github.com>

* fix(radio): focus nativeElement (#12151)

* chore(*): updating dependencies

* Select falsy values via ngModel - 14.1.x (#12096)

* test(simple-combo): should select falsy values with "writeValue" method

* fix(simple-combo): select falsy values with "writeValue" method

* refactor(simple-combo): use 'const' for hasSelection variable

* test(selectionService): should add items with falsy itemID except undefined

* fix(selectionService): add items with falsy itemID except undefined

* test(combos): should select falsy values except "undefined"

* fix(combos): select falsy values except "undefined"

* fix(combos): display and select "null" in dropdown

* test(selectionService): removing an outdated test

* fix(selectionService): removing throw error check

* fix(combos): additional checks for nullish values

* chore(combos): add comment for template check

* chore(remoteNWindService): remove debugger

* test(combos): should remove undefined from array of primitive data

* fix(combos): remove undefined from array of primitive data

* fix(combos): remove undefined in data setter

* fix(simple-combo): show all items in dropdown

* chore(combo-pipes): add comment for grouping pipe

* test(simple-combo): should not select null, undefined, '' in template form

* fix(simple-combo): not select null, undefined, '' in template form

* fix(simple-combo): not select null, undefined, '' in reactive form

* fix(simple-combo): not select null, undefined, '' from dropdown in reactive form

Co-authored-by: Teodosia Hristodorova <52423497+teodosiah@users.noreply.github.com>

* chore(cypress): migrating to cypress 10

* chore(*): fixing tests configure-suite

* chore(*): fixing the typedoc tsconfig

* chore(*): updating dependencies

* chore(*): updating @angular/core @angular/cli

* chore(*): reverting jasmine and jasmine-core ver

* test(d&d): fixing async tests

* chore(d&d): removing fdescribe

* chore(*): fixing grid and d&d tests

* chore(*): fingers crossed this fixes EVERYTHING

* chore(*): waitForAsync not imported

* test(hgrid): fixing global failure for tests

* test(migrations): fixing tsUtils typing

* test(migrations): fixing bufferencoding typing

* chore(*): two hands fingers crossed...

Co-authored-by: Georgi Anastasov <48180072+georgianastasov@users.noreply.github.com>
Co-authored-by: Rumyana Andriova <54146583+randriova@users.noreply.github.com>
Co-authored-by: Maya <MKirova@infragistics.com>
Co-authored-by: MKirova <MKirova@DEV-MKIROVA>
Co-authored-by: Deyan Kamburov <dkamburov@users.noreply.github.com>
Co-authored-by: Zdravko Kolev <zkolev@infragistics.com>
Co-authored-by: Silvia Ivanova <59446295+SisIvanova@users.noreply.github.com>
Co-authored-by: Riva Ivanova <49126110+RivaIvanova@users.noreply.github.com>
Co-authored-by: Teodosia Hristodorova <52423497+teodosiah@users.noreply.github.com>
ChronosSF pushed a commit that referenced this pull request Oct 28, 2022
* chore(*): updating angular/core and cli deps

* chore(*): updating other deps

* chore(*): updating typescript

* chore(*): fixing package version

* chore(deps): removing ^ from typedoc version

* chore(*): fixing indentation in dd tests

* chore(*): updating dependencies

* chore(*): updating tests.ts

* chore(*): updating dependencies

* fix(excel-exporter): export correct number of rows#12086 (#12121)

* fix(excel-exporter): export correct number of rows#12086

* fix(excel-exporter): fix total rowCount with multi col headers#12086

* fix(excel-exporter): fix spacing#12086

* fix(i18n): Updating Grid localization for all languages - 14.1.x

* fix(igxGrid): Fix end edit with Enter when trigger is blur by moving it to more common place. (#12101)

Co-authored-by: MKirova <MKirova@DEV-MKIROVA>
Co-authored-by: Deyan Kamburov <dkamburov@users.noreply.github.com>

* fix(radio): focus nativeElement (#12151)

* chore(*): updating dependencies

* Select falsy values via ngModel - 14.1.x (#12096)

* test(simple-combo): should select falsy values with "writeValue" method

* fix(simple-combo): select falsy values with "writeValue" method

* refactor(simple-combo): use 'const' for hasSelection variable

* test(selectionService): should add items with falsy itemID except undefined

* fix(selectionService): add items with falsy itemID except undefined

* test(combos): should select falsy values except "undefined"

* fix(combos): select falsy values except "undefined"

* fix(combos): display and select "null" in dropdown

* test(selectionService): removing an outdated test

* fix(selectionService): removing throw error check

* fix(combos): additional checks for nullish values

* chore(combos): add comment for template check

* chore(remoteNWindService): remove debugger

* test(combos): should remove undefined from array of primitive data

* fix(combos): remove undefined from array of primitive data

* fix(combos): remove undefined in data setter

* fix(simple-combo): show all items in dropdown

* chore(combo-pipes): add comment for grouping pipe

* test(simple-combo): should not select null, undefined, '' in template form

* fix(simple-combo): not select null, undefined, '' in template form

* fix(simple-combo): not select null, undefined, '' in reactive form

* fix(simple-combo): not select null, undefined, '' from dropdown in reactive form

Co-authored-by: Teodosia Hristodorova <52423497+teodosiah@users.noreply.github.com>

* chore(cypress): migrating to cypress 10

* chore(*): fixing tests configure-suite

* chore(*): fixing the typedoc tsconfig

* chore(*): updating dependencies

* chore(*): updating @angular/core @angular/cli

* chore(*): reverting jasmine and jasmine-core ver

* test(d&d): fixing async tests

* chore(d&d): removing fdescribe

* chore(*): fixing grid and d&d tests

* chore(*): fingers crossed this fixes EVERYTHING

* chore(*): waitForAsync not imported

* test(hgrid): fixing global failure for tests

* test(migrations): fixing tsUtils typing

* test(migrations): fixing bufferencoding typing

* chore(*): two hands fingers crossed...

* chore(*): getting rid of jasmine-spec-tags

* chore(*): adding node 18.x to execution matrix

* ci(azure-pipelines): changing karma conf

* test(hgrid): optimizing hgrid selection tests

* chore(*): removing fdescribe

* chore(*): increasing jasmine timeout again

* chore(*): updating types versions

* test(perf): disabling performance tests

* chore(*): trying something out

* chore(*): returning parallel

* test(hgrid): speeding up hgrid tests

* test(hgrid): adding DEBOUNCE_TIME to two tests

* test(hgrid): adding a common describe

* test(hgrid): fixing a failing test

* chore(*): ofc forgot the fdescribe

* chore(*): fixing indentation

* chore(*): increasing a timeout

Co-authored-by: Georgi Anastasov <48180072+georgianastasov@users.noreply.github.com>
Co-authored-by: Rumyana Andriova <54146583+randriova@users.noreply.github.com>
Co-authored-by: Maya <MKirova@infragistics.com>
Co-authored-by: MKirova <MKirova@DEV-MKIROVA>
Co-authored-by: Deyan Kamburov <dkamburov@users.noreply.github.com>
Co-authored-by: Zdravko Kolev <zkolev@infragistics.com>
Co-authored-by: Silvia Ivanova <59446295+SisIvanova@users.noreply.github.com>
Co-authored-by: Riva Ivanova <49126110+RivaIvanova@users.noreply.github.com>
Co-authored-by: Teodosia Hristodorova <52423497+teodosiah@users.noreply.github.com>
ChronosSF pushed a commit that referenced this pull request Nov 17, 2022
* chore(*): updating angular/core and cli deps

* chore(*): updating other deps

* chore(*): updating typescript

* chore(*): fixing package version

* chore(deps): removing ^ from typedoc version

* chore(*): fixing indentation in dd tests

* chore(*): updating dependencies

* chore(*): updating tests.ts

* chore(*): updating dependencies

* fix(excel-exporter): export correct number of rows#12086 (#12121)

* fix(excel-exporter): export correct number of rows#12086

* fix(excel-exporter): fix total rowCount with multi col headers#12086

* fix(excel-exporter): fix spacing#12086

* fix(i18n): Updating Grid localization for all languages - 14.1.x

* fix(igxGrid): Fix end edit with Enter when trigger is blur by moving it to more common place. (#12101)

Co-authored-by: MKirova <MKirova@DEV-MKIROVA>
Co-authored-by: Deyan Kamburov <dkamburov@users.noreply.github.com>

* fix(radio): focus nativeElement (#12151)

* chore(*): updating dependencies

* Select falsy values via ngModel - 14.1.x (#12096)

* test(simple-combo): should select falsy values with "writeValue" method

* fix(simple-combo): select falsy values with "writeValue" method

* refactor(simple-combo): use 'const' for hasSelection variable

* test(selectionService): should add items with falsy itemID except undefined

* fix(selectionService): add items with falsy itemID except undefined

* test(combos): should select falsy values except "undefined"

* fix(combos): select falsy values except "undefined"

* fix(combos): display and select "null" in dropdown

* test(selectionService): removing an outdated test

* fix(selectionService): removing throw error check

* fix(combos): additional checks for nullish values

* chore(combos): add comment for template check

* chore(remoteNWindService): remove debugger

* test(combos): should remove undefined from array of primitive data

* fix(combos): remove undefined from array of primitive data

* fix(combos): remove undefined in data setter

* fix(simple-combo): show all items in dropdown

* chore(combo-pipes): add comment for grouping pipe

* test(simple-combo): should not select null, undefined, '' in template form

* fix(simple-combo): not select null, undefined, '' in template form

* fix(simple-combo): not select null, undefined, '' in reactive form

* fix(simple-combo): not select null, undefined, '' from dropdown in reactive form

Co-authored-by: Teodosia Hristodorova <52423497+teodosiah@users.noreply.github.com>

* chore(cypress): migrating to cypress 10

* chore(*): fixing tests configure-suite

* chore(*): fixing the typedoc tsconfig

* chore(*): updating dependencies

* chore(*): updating @angular/core @angular/cli

* chore(*): reverting jasmine and jasmine-core ver

* test(d&d): fixing async tests

* chore(d&d): removing fdescribe

* chore(*): fixing grid and d&d tests

* chore(*): fingers crossed this fixes EVERYTHING

* chore(*): waitForAsync not imported

* test(hgrid): fixing global failure for tests

* test(migrations): fixing tsUtils typing

* test(migrations): fixing bufferencoding typing

* chore(*): two hands fingers crossed...

* chore(*): getting rid of jasmine-spec-tags

* chore(*): adding node 18.x to execution matrix

* ci(azure-pipelines): changing karma conf

* test(hgrid): optimizing hgrid selection tests

* chore(*): removing fdescribe

* chore(*): increasing jasmine timeout again

* chore(*): updating types versions

* test(perf): disabling performance tests

* chore(*): updating to angular 15 rc0

* chore(*): adding a temporary --force on ci

* chore(ci): changing to npm install for force

* chore(*): updating the browserlist

* test(checkbox, switch, radio): reworking disabled

* chore(*): updating @angular/cli to 15 rc2

* chore(*): updating @angular/core to 15 RC2

* chore(*): updating dependencies

* chore(*): reverting theming package version

* chore(*): updating @angular/cli to 15 RC3

* chore(*): updating @angular/core to 15 RC3

* chore(schematics): update package.json & @igniteui/angular-schematics

* chore(*): updating lock file

* chore(*): updating @angular/core and cli to 15 rc4

* chore(*): updating more deps

* chore(*): Revert "test(checkbox, switch, radio): reworking disabled" b3c88e2

* test(checkbox, switch, radio): bring back the test fixes from the revert

* chore(migrations): add root which is required in the new angular.json schema

* chore(*): ng update @angular/core@15.0.0

* chore(*): ng update @angular/cli@15.0.0

* chore(*): update product package.json

* chore(*): updating @angular-eslint

Co-authored-by: Georgi Anastasov <48180072+georgianastasov@users.noreply.github.com>
Co-authored-by: Rumyana Andriova <54146583+randriova@users.noreply.github.com>
Co-authored-by: Maya <MKirova@infragistics.com>
Co-authored-by: MKirova <MKirova@DEV-MKIROVA>
Co-authored-by: Deyan Kamburov <dkamburov@users.noreply.github.com>
Co-authored-by: Zdravko Kolev <zkolev@infragistics.com>
Co-authored-by: Silvia Ivanova <59446295+SisIvanova@users.noreply.github.com>
Co-authored-by: Riva Ivanova <49126110+RivaIvanova@users.noreply.github.com>
Co-authored-by: Teodosia Hristodorova <52423497+teodosiah@users.noreply.github.com>
Co-authored-by: lipata <nikolay.alipiev@gmail.com>
Co-authored-by: Deyan Kamburov <dkamburov@infragistics.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
simple-combo squash-merge Merge PR with "Squash and Merge" option version: 14.1.x ✅ status: verified Applies to PRs that have passed manual verification
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants