jplist-es6 icon indicating copy to clipboard operation
jplist-es6 copied to clipboard

Two Dropdown sort Control at the same time not working

Open boulepick opened this issue 6 years ago • 0 comments

Hello, looks like the plugin will not accept two Dropdown sort filter at the same time, only one will work and the other one will just be ignored. for example i have this setup

		<div class="dropdown mr-3"
			data-jplist-control="dropdown-sort"
			data-opened-class="show"
			data-group="programs"
			data-name="sortText">
			<button class="btn btn-outline dropdown-toggle"
				data-type="panel"
				type="button">Title/Desc
			</button>
	
			<div class="dropdown-menu bg-teal-600"
				data-type="content"
				aria-labelledby="dropdownMenuButton">
				
				<a
					class="dropdown-item"
					href="#"
					data-path="default">
					Title/Desc
				</a>
	
				<a
					class="dropdown-item"
					href="#"
					data-path=".title"
					data-order="asc"
					data-type="text">
					<i class="fa fa-sort-alpha-up"></i>
					Title A-Z
				</a>
		
				<a
					class="dropdown-item"
					href="#"
					data-path=".title"
					data-order="desc"
					data-type="text">
					<i class="fa fa-sort-alpha-down"></i>
					Title Z-A
				</a>
			</div>
		</div>
	
		<div class="dropdown mr-3"
			data-jplist-control="dropdown-sort"
			data-opened-class="show"
			data-group="programs"
			data-name="sortNumbers">
			<button
				data-type="panel"
				class="btn btn-outline dropdown-toggle"
				type="button">Metrics
			</button>
	
			<div class="dropdown-menu bg-teal-600"
				data-type="content"
				aria-labelledby="dropdownMenuButton">
			
				<a
					class="dropdown-item"
					href="#"
					data-path="default">
					Metrics
				</a>
				
				<!-- downloads -->
				<a
					class="dropdown-item"
					href="#"
					data-path=".downloads"
					data-order="asc"
					data-type="number">
					<i class="fa fa-sort-numeric-up"></i>
					Download
				</a>

				<a
					class="dropdown-item"
					href="#"
					data-path=".downloads"
					data-order="desc"
					data-type="number">
					<i class="fa fa-sort-numeric-down"></i>
					Download
				</a>
			</div>
		</div>

now if i have both of them on the HTML, only the first one will actually do the sort, the second sort will not trigger anything.

boulepick avatar Nov 21 '18 15:11 boulepick