wet-boew/GCWeb

Bug - Fieldflow table filter not firing when the filter sequence includes the first column

Christopher-O opened this issue · 0 comments

Describe the bug

In fieldflow advanced table filtering
https://wet-boew.github.io/GCWeb/components/wb-fieldflow/advanced-en.html#tblfilter
adding the filter to the first column (column 0) does not work and the filter does not render.

To Reproduce

Steps to reproduce the behaviour:

  1. Go to 'https://wet-boew.github.io/GCWeb/components/wb-fieldflow/advanced-en.html#tblfilter'
  2. Use example code below which manipulates the example code to move the summary to the first column (0) and try to apply filter, which does not render. But if you change to column 3, it does work as normal

Example

<div class="wb-fieldflow" data-wb-fieldflow='
		{
			"srctype": "tblfilter",
			"noForm": true,
			"source": "#table-filtering-example1",
			"fltrseq": [
				{"column": 0}
			],
			"limit": 3
		}'></div>
</form></div>


<table id="table-filtering-example1" class="wb-tables table table-striped table-hover">
	<thead>
		<tr>
			<th>Summary</th>
			<th>Title</th>
			<th>Publication date</th>
		
			<th>Subject</th>
		</tr>
	</thead>
	<tbody>
		<tr>
		<td>
				<p>The governments of Canada and Manitoba are supporting a greener, more sustainable economy through the $1 million Biomass Energy Support Program, Federal Agriculture Minister Lawrence MacAulay and Manitoba Agriculture Minister Ralph Eichler announced today.</p>
				<p>For:</p>
				<ul>
					<li>Media</li>
					<li>Farmers</li>
					<li>General Public</li>
				</ul>
			</td>
			<td><a href="https://news.gc.ca/web/index-en.do">Biomass Program Continues to Support Transition to Renewable Energy in Manitoba</a></td>
			<td>2016-07-29 12:07:00</td>
			
			<td>
				<ul>
					<li>Agriculture</li>
				</ul>
			</td>
		</tr>
		<tr>
		<td>
				<p>Rodger Cuzner, Member of Parliament for Cape Breton – Canso, on behalf of the Honourable Navdeep Bains, Minister of Innovation, Science and Economic Development and Minister responsible for the Atlantic Canada Opportunities Agency, will make a funding announcement at the Broad Cove Scottish Concert..</p>
				<p>For:</p>
				<ul>
					<li>Media</li>
					<li>Rural Community</li>
					<li>Travellers</li>
					<li>Visitors</li>
					<li>General Public</li>
				</ul>
			</td>
			<td><a href="https://news.gc.ca/web/index-en.do">MP Rodger Cuzner to make announcement in Broad Cove</a></td>
			<td>2016-07-29 12:07:00</td>
			
			<td>
				<ul>
					<li>Society and Culture</li>
					<li>Arts</li>
					<li>Music</li>
					<li>Literature</li>
				</ul>
			</td>
		</tr>
		<tr>
		<td>
				<p>The Government of Canada supports the Musée du Fjord.</p>
				<p>For:</p>
				<ul>
					<li>General Public</li>
				</ul>
			</td>
			<td><a href="https://news.gc.ca/web/index-en.do">An Exhibition Dedicated to the Caribou and Other Animals Like It</a></td>
			<td>2016-07-29 11:07:00</td>
			
			<td>
				<ul>
					<li>Arts</li>
					<li>Music</li>
					<li>Literature</li>
				</ul>
			</td>
		</tr>
		<tr>
		<td>
				<p>The Government of Canada delivered the first of two federal Gas Tax Fund installments for 2016-17 to all the provinces and territories benefitting 364 municipalities in Alberta..</p>
				<p>For:</p>
				<ul>
					<li>Media</li>
					<li>General Public</li>
				</ul>
			</td>
		<td><a href="https://news.gc.ca/web/index-en.do">Backgrounder: Government of Canada delivers $109 million to Alberta for community infrastructure projects</a></td>
			<td>2016-07-29 11:07:00</td>
			
			<td>
				<ul>
					<li>Transport</li>
				</ul>
			</td>
		</tr>
		<tr>
		<td>
				<p>Modern and up-to-date community infrastructure helps ensure that Canadians live the quality of life that they want and expect. Community infrastructure helps connect people to jobs and provides access to better community services, attracts new businesses and creates economic growth opportunities..</p>
				<p>For:</p>
				<ul>
					<li>Media</li>
					<li>General Public</li>
				</ul>
			</td>
			<td><a href="https://news.gc.ca/web/index-en.do">Government of Canada delivers $109 million to Alberta for community infrastructure projects</a></td>
			<td>2016-07-29 11:07:00</td>
			
			<td>
				<ul>
					<li>Transport</li>
				</ul>
			</td>
		</tr>
		<tr>
		<td>
				<p>WINNIPEG – The Honourable Jim Carr, Minister of Natural Resources....</p>
				<p>For:</p>
				<ul>
					<li>General Public</li>
				</ul>
			</td>
			<td><a href="https://news.gc.ca/web/index-en.do">Minister Carr to Make an Announcement About the Winnipeg Art Gallery</a></td>
			<td>2016-07-29 11:07:00</td>
			
			<td>
				<ul>
					<li>Arts</li>
					<li>Music</li>
					<li>Literature</li>
				</ul>
			</td>
		</tr>
		<tr>
		<td>
				<p>What an honour to be at the University of Toronto-my alma mater-for this tremendous announcement..</p>
				<p>For:</p>
				<ul>
					<li>Business</li>
					<li>General Public</li>
				</ul>
			</td>
			<td><a href="https://news.gc.ca/web/index-en.do">Post-Secondary Institutions Strategic Investment Fund Announcement at the University of Toronto</a></td>
			<td>2016-07-29 10:07:00</td>
			
			<td>
				<ul>
					<li>Economics and Industry</li>
				</ul>
			</td>
		</tr>
		<tr>
		<td>
				<p>Thank you, Meric [Meric S. Gertler, President, University of Toronto]. And thank you to the University of Toronto for being such great hosts today. I'm delighted to be here with my friend and colleague Kirsty Duncan, Minister of Science..</p>
				<p>For:</p>
				<ul>
					<li>General Public</li>
				</ul>
			</td>
			<td><a href="https://news.gc.ca/web/index-en.do">Post-Secondary Institutions Strategic Investment Fund Announcement at the University of Toronto</a></td>
			<td>2016-07-29 10:07:00</td>
			
			<td>
				<ul>
					<li>Economics and Industry</li>
				</ul>
			</td>
		</tr>
	</tbody>
</table>

Current behaviour

The script works just fine on all columns except the first one

Expected behaviour

That the script can also work on the first column