WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #30505, comment 9


Ignore:
Timestamp:
09/30/2016 05:30:31 PM (4 years ago)
Author:
nerrad
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #30505, comment 9

    initial v1  
    11So I ran into this while working on a project so just thought I'd post what I'm finding so far here.  Basically my use case is I've got an already loaded wp list table.  I have a main parent view that is the list table tbody element.  And then I want each existing row in the table to be its own subview.  For this initial implementation backbone along with the wp-api client js library is just being used to do quick edit like tasks in the rows.  The initial models data in the subview isn't fetched until an event is fired in the row.
    22
    3 Anyways, where I ran into issues is exactly as Ryan first described in here where I couldn't add the `tr` selectors as subviews in the parent view via a loop.  I then tried what Adam suggested (leaving the selector blank on creating the subview) and then added my row element as a selector in the el property for the subview and so far that seems to be working.  Something like this:
     3Anyways, where I ran into issues is similar as Ryan first described in here where in my case I couldn't add the `tr` selectors as subviews in the parent view via a loop.  I then tried what Adam suggested (leaving the selector blank on creating the subview) and then added my row element as a selector in the el property for the subview and so far that seems to be working.  Something like this:
    44
    55{{{