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

Transcluded/Compiled AngularJS Content Into Table Cells #206

Open
jongunter opened this issue May 30, 2017 · 0 comments
Open

Transcluded/Compiled AngularJS Content Into Table Cells #206

jongunter opened this issue May 30, 2017 · 0 comments

Comments

@jongunter
Copy link

It would be nice to have functionality where I could transclude content into a cell that would be compiled using AngularJS. I have AngularJS components that are used elsewhere in my application and I'd love to be able to re-use them in my table. It might look like this:

<hot-table settings="{colHeaders: colHeaders, contextMenu: ['row_above', 'row_below', 'remove_row'], afterChange: afterChange}"
           row-headers="false"
           min-spare-rows="minSpareRows"
           datarows="db.items"
           height="300"
           width="700">
    <hot-column data="id" title="'ID'">

      <!-- BEGIN proposed functionality -->
       <hot-contents>
           <my-user-image id="$cellValue">
           </my-user-image>
          {{ $rowIndex - $cellValue }}
       </hot-contents>
      <!-- END proposed functionality -->

    </hot-column>
    <hot-column data="name.first" title="'First Name'" type="grayedOut" read-only></hot-column>
    <hot-column data="name.last" title="'Last Name'" type="grayedOut" read-only></hot-column>
    <hot-column data="address" title="'Address'" width="150"></hot-column>
    <hot-column data="product.description" title="'Favorite food'" type="'autocomplete'">
        <hot-autocomplete datarows="description in product.options"></hot-autocomplete>
    </hot-column>
    <hot-column data="price" title="'Price'" type="'numeric'" width="80" format="'$ 0,0.00'"></hot-column>
    <hot-column data="isActive" title="'Is active'" type="'checkbox'" width="65" checked-template="'Yes'" unchecked-template="'No'"></hot-column>
</hot-table>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants