Skip to content

Instantly share code, notes, and snippets.

Last active December 12, 2019 15:31
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
function filterList(componentName, label, filter) {
let component = PF(componentName),
itemLabel = label.toLocaleLowerCase(),
item = $(component.items)
.filter(function () {
return $(this).data('label').toString().toLocaleLowerCase() === itemLabel;
if (item === undefined) {
return false;
let value = $(item.children().last()).html().toString().trim().toLocaleLowerCase();
return value.startsWith(filter);
function filterApplicant(label, filter) {
return filterList('widget_mainTab_applicantForm_countryCodeApplicant', label, filter);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment