Results 1 to 2 of 2

Thread: Remove field from Record (model instance)

  1. #1
    Sencha Premium User
    Join Date
    Nov 2015
    Posts
    19

    Question Remove field from Record (model instance)

    I have a model with fields ['INFO1', 'INFO2', 'INFO3'].

    When I'm having a record from a store with this model assigned, it's possible to add an additional field, which is not defined in the model.
    record.set('INFO4', 'some value')

    My Question:
    Is it also possible to delete a field from this record?

    Problem:
    The update-API from the store-proxy adds this new field in the changed parameters (which is correct in my opinion). But I only want to have the fields from the model.

  2. #2
    Sencha Premium Member yorl1n's Avatar
    Join Date
    Mar 2015
    Location
    Germany
    Posts
    294
    Answers
    30

    Default

    Code:
    delete record.data.INFO4

Similar Threads

  1. Replies: 1
    Last Post: 23 Oct 2013, 3:43 PM
  2. Replies: 1
    Last Post: 3 Dec 2012, 7:42 AM
  3. Replies: 9
    Last Post: 30 Nov 2011, 5:10 AM
  4. Replies: 1
    Last Post: 13 Apr 2011, 1:56 PM
  5. Replies: 2
    Last Post: 5 Feb 2009, 2:48 PM

Tags for this Thread

Posting Permissions

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