Skip to content
This repository has been archived by the owner on Nov 17, 2021. It is now read-only.

krisdages/aurelia-table

 
 

Repository files navigation

This is a fork of Hector Romero's aurelia-table plugin. It contains some optimizations of sorting/filtering and supports specifying column datatype with a corresponding registry of default sort functions. By default, columns with type Number, Date, and Boolean will use a numeric sort.

There is no separate documentation for this fork (sorry).

Please visit the project page for the documentation and examples.

Features

Aurelia Table is very easy to use, and you have complete control over the look and feel. You can make your table look exactly the way you want using plain html and css. Out of the box you will get:

  • Row Filtering
  • Column Sorting
  • Client side pagination
  • Row Selection

For a complete list of features and examples please visit the project page.

Release Notes

Fork by Kris Dages

0.9.0-prerelease

  • Update handling of default sort so it doesn't overwrite calls to sortByKey() that happen before attached()

    Default sort attribute is now determined when the sort/filter/paging is applied and memoized until attributes change, rather than being applied immediately upon the attribute being added.

    This may be a breaking change: the behavior if multiple attributes have "default" sort defined is different... the first default attribute in the set now takes precedence rather than the last.

0.8.3-prerelease

  • Fix error creating collectionObserver in dataChanged() when data is null or undefined.

0.8.2-prerelease

  • Pass sort order 1/-1 as second parameter to sortKey function

0.8.0-prerelease

  • Allow Array of path properties for sortKey instead of dotted syntax.

0.7.0-prerelease

  • Changes to sort functionality
    • Added bindable id property to sort attribute
    • Added setActive(order) method to sort attribute
      • Triggers a sort on the attribute as if it had been clicked, using the specified order.
    • Added sorting methods to table attribute
      • setDefaultSort(sortAttribute)
        • Activates the provided attribute if the table is not already sorted.
          This change prevents forced sorts when columns are added to the table.
      • clearSort() - Removes any sorting currently applied to the table.
      • sortByAttributeId(id, order) / sortByKey(key, order)
        • Sort by the sort attribute with the given id/key, using the specified order.
          If there is not a sort attribute with the given id/key, the table will be sorted by that attribute if it is added before the table is sorted again.
          (This behavior is to support adding a column and sorting by it programmatically within the same event frame)

0.6.1-prerelease

  • Fixed bug in sort function numericDemoteNull

0.6.0-prerelease

  • Optimized paging - Don't re-filter/sort for page changes
  • Added lastDataUpdate bindable property that contains:
    • the type of update: "data" | "sort" | "filter" | "page"
    • the applied sort properties
    • the applied filter values
    • displayData
    • and displayDataUnpaged

0.5.0-prerelease

  • Allow sort functions for a column type to be specified as a tuple of [sortAsc, sortDesc] instead of a single asc sort function.
  • Added numericDemoteNull tuple to sortFunctions export.
    (always sorts null/undefined to the bottom for both asc/desc sort)

0.4.0

  • Expose bindable property displayDataUnpaged for accessing the sorted/filtered data without paging.

0.3.0

  • Added bindable delegate onFilterChanged

0.2.0

  • Optimized sorting and filtering. Added binding for sort datatype to aut-sort attribute.
End Fork by Kris Dages

0.1.13

  • Disable pagination if Page size is 0. Fixes #32
  • Improve support for webpack 2.0. Fixes #38

About

Simple functional data table for Aurelia

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 95.4%
  • HTML 4.6%