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

[table] Async providers, events, and enhancements #460

Merged
merged 137 commits into from Jun 17, 2017
Merged

[table] Async providers, events, and enhancements #460

merged 137 commits into from Jun 17, 2017

Conversation

tmorehouse
Copy link
Member

@tmorehouse tmorehouse commented May 27, 2017

Adds async provider function support (callback and Promise based)

Deprecates items-provider in favour of passing function to items prop

Adds scoped slot support for table header and footers

Added busy prop for triggering table "busy" state (via `aria-busy="true" attribute).

Emits head-clicked event when header cells are clicked (when not busy), and a refreshed event when the provider function has completed/resolved.

Added sort-changed event when sorting criteria has changed

Added extra documentation.

A working prototype example can be found here: https://jsfiddle.net/dyzs5txk/ (complete with header/footer scoped slots). You can select how the items are provided to b-table (view the console for the various stages of data retrieval). The example requires a browser that supports Promises (just to emulate the delay in fetching data).

The updated documentation provides greater detail on the new features

image

@tmorehouse tmorehouse requested a review from pi0 May 27, 2017 03:42
@tmorehouse
Copy link
Member Author

Finally, provider function testing is complete.

@tmorehouse tmorehouse mentioned this pull request Jun 15, 2017
@tmorehouse
Copy link
Member Author

@pi0 @alexsasharegan
I was just thinking of another slight enhancement to b-table.

BS-4 supports variants on individual cells, but currently we only support variants on the entire row (via _rowVariant in the data array). I think we could add support for cell variants either by providing an array of variants to _rowVariant, or adding a new modifier property of _cellVariants which would need to be an array of variants.

What do you guys think? This would address issue #479

@tmorehouse tmorehouse changed the title [table] Async providers and enhancements [table] Async providers, events, and enhancements Jun 16, 2017
emit row-hovered event (similar to row-clicked)

Add optional _cellVariants object support for items, to sit alongside _rowVariant, to allow for coloring of individual cells.  takes precedence over field.variant
@tmorehouse
Copy link
Member Author

Added support for row-hovered event (issue #514)
Added contextual variant support for individual data cells (addresses issue #479)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants