DataTables / DataTables/Plugins

Conditional Paging not working in Firefox (v63.0.3)

Open
#407 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
1.1k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

I noticed that the plugin ConditionalPaging.js wasn't firing when I viewed my page in Firefox.

(https://github.com/DataTables/Plugins/blob/master/features/conditionalPaging/dataTables.conditionalPaging.js)

I thought it might be that I had conditionalPaging in quotes, but either way, when I initialize my DataTables, "conditionalPaging": true OR conditionalPaging: true wouldn't work.

I dove into the actual code and inserted a few console.logs and I found that the options variable is returning as undefined. I don't know how to resolve this. It's working fine in Chrome and Safari.

### Example JS:

$('#myTable').DataTable({
			"pageLength": 12,
			conditionalPaging: true,
			"pagingType": "simple_numbers",
			"searching": true,
			"dom": '<"top"fp<"clear">>rt<"bottom"p<"clear">>',
			"language": {
				"search": "",
				"searchPlaceholder": "Search Wish List",
				"paginate": {
					"first": "<<",
					"previous": "<",
					"next": ">",
					"last": ">>",
				}
			},
			"columnDefs": [{
				"targets": [0, 1],
				"orderable": false
			}],
			"order": [],
			"initComplete": function(settings, json) {
				
				$(".dataTables_wrapper .top").addClass("row mb-3");
				$(".dataTables_wrapper .bottom").addClass("row mb-3");
				$(".dataTables_wrapper .top .dataTables_filter").addClass("mt-0 col-8 col-md-6 text-left");
				$(".dataTables_wrapper .top .dataTables_filter input").addClass("form-control form-control-sm mx-0");
				$(".dataTables_wrapper .top .dataTables_paginate").addClass("mt-0 pl-0 col-4 col-md-6 text-right");
				$(".dataTables_wrapper .bottom .dataTables_paginate").addClass("pl-0 col-12 text-right");
			}
		});

edit: I am using DataTables 1.10.19

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with features/conditionalPaging/dataTables.conditionalPaging.js and reproduce the issue in Firefox 63.0.3 using the initialization example. Inspect why the options variable is undefined, then verify that conditionalPaging works in Firefox while remaining functional in Chrome and Safari.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.