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

Update DataTable to fix bug with search input #42

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Ana06
Copy link
Member

@Ana06 Ana06 commented Nov 30, 2018

:bowtie:

This need openSUSE/open-build-service#6410 to get merged

@Ana06 Ana06 requested a review from dmarcoux November 30, 2018 13:45
@hennevogel
Copy link
Member

hennevogel commented Nov 30, 2018

Deploy preview for obs-patterns failed.

Built with commit 48d83d2

https://app.netlify.com/sites/obs-patterns/deploys/5c0536270097d4092d7679f0

Additionally, you can also use [DataTable](https://datatables.net/examples/styling/bootstrap4)'.
Style it with striped rows (`.table-striped`) and borders (`.table-bordered`).
Do not forget to initialize it with `initializeDataTable()` and to wrap it inside the class `.obs-dataTable`,
as this is solving a [bug related to the search field not being resposive](https://github.com/mkhairi/jquery-datatables/issues/14).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a typo here: not being responsive

@@ -5,8 +5,10 @@
description: A `%div` container with the CSS class `.table-responsive` makes the table responsive. The width of columns can be adjusted by using the
[Bootstrap's sizing classes](https://getbootstrap.com/docs/4.1/utilities/sizing/) on the `%th` tags
([Bootstrap's grid system](https://getbootstrap.com/docs/4.1/layout/grid/) doesn't work for tables in Chrome).
Additionally, we are using [DataTable](https://datatables.net/examples/styling/bootstrap4)'s [responsive](https://datatables.net/extensions/responsive/)
and style them with striped rows (`.table-striped`) and borders (`.table-bordered`). However, you can use tables with and without datatables.
Additionally, you can also use [DataTable](https://datatables.net/examples/styling/bootstrap4)'.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sentence seems out of place now. Do we still need it? I don't believe so.

$('#my-datatable').DataTable({
responsive: true
});
= content_for :ready_function do
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should still be :javascript as content_for doesn't work in Jekyll

@dmarcoux
Copy link
Contributor

@Ana06 ping!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants