Results 1 to 3 of 3

Thread: Component IsDirty Property always returns true

  1. #1
    Sencha User
    Join Date
    Oct 2013
    Posts
    200
    Answers
    3

    Default Component IsDirty Property always returns true

    Hi All,

    I have a form containing 4 comboboxes and i have to check if a user is changing value of some comboxes i need to send only that combox values after submitting.

    I have tried to check with combobox's isDirty function but i am facing some issue in that, as i am setting some default values of combobox so the field is always dirty when i load it first tim.

    I have tried with one alternative when i am setting default value of combobox after that i am again trying to set the fields dirty flag to false but it is always true

    var combo = combo.setValue('45') // dummy value
    combo.isDirty(false);
    but still after that i am getting isDirty 'True' always.

    can anybody please tell me how to check that after loading the default field how can we check if the field is changed or not ????
    Or is there any way to check with the form that what all fields in the form is updated ??

    Thanks in advance,
    Ankit

  2. #2
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,664
    Answers
    512
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid MultiSearch Plugin, Grid MultiSort Plugin, Configuring ViewModel Hierarchy


  3. #3
    Sencha User
    Join Date
    Oct 2013
    Posts
    200
    Answers
    3

    Default

    Thanks for the prompt reply,

    Can you please tell me how we can use that.

    if i do trackResetOnLoad:true on the main form of the component, then how i can set the dirty flag of any component to false.

    As mentioned in the docs : If set to true, reset() resets to the last loaded or setValues() data instead of when the form was first created.

    setValues i am using after loading the data in the combobox and field is getting dirty. can we revert back to this flag as false ??

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •