Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Feb 20 16:03
    Kiran-Pawar edited #284
  • Feb 20 16:03
    Kiran-Pawar edited #285
  • Feb 20 16:02
    Kiran-Pawar opened #285
  • Feb 20 16:00
    mitanshu-patel edited #283
  • Feb 20 15:54
    Kiran-Pawar opened #284
  • Feb 20 15:50
    mitanshu-patel opened #283
  • Feb 20 07:45
    sonusam009 opened #282
  • Feb 19 06:06
    ajayojha closed #279
  • Feb 19 06:05
    ajayojha milestoned #279
  • Feb 19 06:01

    ajayojha on master

    feat:dom, angular-router and gr… (compare)

  • Feb 19 02:01
    kelvinsleonardo opened #281
  • Feb 18 04:31
    ajayojha commented #280
  • Feb 18 04:30
    ajayojha labeled #280
  • Feb 18 03:18
    yellowgrass edited #280
  • Feb 18 03:13
    yellowgrass opened #280
  • Feb 14 15:13

    ajayojha on master

    enhancement in grid, dom and an… (compare)

  • Feb 10 10:25

    ajayojha on master

    fix(service): allow the date ob… (compare)

  • Feb 10 10:23
    ajayojha opened #279
  • Feb 10 10:23
    ajayojha labeled #279
  • Feb 10 09:10

    ajayojha on master

    fix(grid): dropdown selected va… (compare)

Ushmidave
@Ushmidave
@st-clair-clarke here is an example of dynamic form which is getting its server data from json located in assets :https://stackblitz.com/edit/angular-xhiqpc-6ordub?file=src/app/dynamic-complete.component.html
J S
@kubasienki_gitlab
Hello everyone!
Having problem - adding rxwab validators breaks my app
Will anyone halp?
help* :)
J S
@kubasienki_gitlab
Nvm got it, the problem was in the tutorial which I had followed
After that official usage guide didn't work
Ajay Ojha
@ajayojha
@kubasienki_gitlab , I would like to know the use case. It would be great if you share the code snippet
J S
@kubasienki_gitlab
Simply just import of the module broke app. It compiled but had issues in js
import {  RxReactiveFormsModule } from '@rxweb/reactive-form-validators';
I'll try to search for error code
Ajay Ojha
@ajayojha
please share the issue screenshot
J S
@kubasienki_gitlab
I've fixed it so don't have it
sorry :<
the error was: Cannot read property "'firstCreatePass'" of null
I know it's very scarse info - if that happen another time I'll document it better
Ajay Ojha
@ajayojha
Ok Great @kubasienki_gitlab
J S
@kubasienki_gitlab
@ajayojha If you have a moment I would be very grateful for some help with unique validator
Ajay Ojha
@ajayojha
Yes
J S
@kubasienki_gitlab
I've followed your tutorial with minor changes and don't get it why it doesn't work :)
return this.fb.group({
      driver: [null, [Validators.required, RxwebValidators.unique()]],
      file: [null, Validators.required]
    });
here i create group which has validation
Ajay Ojha
@ajayojha
this formgroup is in array; right?
J S
@kubasienki_gitlab
here i add it to array
And no matter what it validates as invalid with message:
{ "unique": { "message": "", "refValues": [ { "id": 3, "name": "Jan" } ] } }

Jan
Thought it may be problem with ng-bootstrap, but even on normal input doesn't work
Always the second one is flagged
Ajay Ojha
@ajayojha
as per the provided json, it's showing that it's working
J S
@kubasienki_gitlab
yes, but why different values are flagged as the same
Ajay Ojha
@ajayojha
let me check
J S
@kubasienki_gitlab
it may be helpful to know that my model of that field consists of an object: { "id": 4, "name": "Andrii" }
like that
And that's probably my problem :D
Ajay Ojha
@ajayojha

it may be helpful to know that my model of that field consists of an object: { "id": 4, "name": "Andrii" }

the above provided formgroup object and this json value is different

J S
@kubasienki_gitlab
that model is for field driver
so this is result of filling whole form: { "plannedDate": "", "driversAndFiles": [ { "driver": { "id": 1, "name": "Andrzej" } }, { "driver": { "id": 4, "name": "Andrii" } } ] }
{ "plannedDate": "", "driversAndFiles": [ { "driver": { "id": 1, "name": "Andrzej" } }, { "driver": { "id": 4, "name": "Andrii" } } ] }
and the array which should be validated is called: driversAndFiles and the field inside is driver
Ajay Ojha
@ajayojha
@kubasienki_gitlab I have not covered the case of nested form group in formarray
J S
@kubasienki_gitlab
Ok, thanks
sholkajadav11
@sholkajadav11
Hi Ajay
Ajay Ojha
@ajayojha
Hi @sholkajadav11
sholkajadav11
@sholkajadav11
The site is not working in my laptop
Ajay Ojha
@ajayojha
Can you please open this url: docs.rxweb.io
sholkajadav11
@sholkajadav11
Thanks
st-clair-clarke
@st-clair-clarke

Hi @ajayojha . I am having difficulty representing the IPain interface below as an IFormGroup<IPain>. Any help is appreciated.

export interface IPain {
  id: ID
  duration: IFrequency
  mediators: IMediator[]
  nature: string[]
}

interface IFrequency {
  digit: number
  separator: string
  unit: string
}

interface IMediator {
  mediator: string

  alleviator: boolean
  exacerbator: boolean
  precipitant: boolean
}

Thanks

Ushmidave
@Ushmidave
@st-clair-clarke which object are you passing in the formGroup method of RxFormBuilder ? can you show me that code snippet
st-clair-clarke
@st-clair-clarke
Pain object.
form: IFormGroup<Pain> = this._fb.formGroup( Pain ) as IFormGroup<Pain>
Ushmidave
@Ushmidave
@st-clair-clarke Have a look at this example similar to your case described : https://stackblitz.com/edit/angular-v5gsac?file=src/app/strongly-type-complete.component.ts
mitanshu-patel
@mitanshu-patel
Hi @ajayojha .I am facing issue in rx-date picker. Can you please have a look into this ticket :-rxweb/rxweb#283
st-clair-clarke
@st-clair-clarke

@Ushmidave. Thanks for your help. Note the following changes in your Pain class:

export class Pain{
  @prop()
   id: ID

   @propObject()
  duration: IFrequency

  @propObject()
  mediators: IMediator[]

  @prop()
  nature: string[]
}

interface ID{
  id:number;
}

interface IFrequency {
  digit: number
  separator: string
  unit: string
}

interface IMediator {
  mediator: string

  alleviator: boolean
  exacerbator: boolean
  precipitant: boolean
}

My problem is how to best manage the propObjects and the prop with type array.