Hi Martin,

You can simply change your Module base definition to filter the initial
base element using your selector and if that returns a falsey (i.e. empty)
Navigator then default it to the element selected using your selector:

class Dropdown extends Module {
  private static final String BASE_SELECTOR = "p-dropdown"

  static base = {
    $().filter(BASE_SELECTOR) ?: $(BASE_SELECTOR)
  }
}

Hope that helps,
Marcin

On Mon, Dec 3, 2018 at 8:39 AM Martin de laat <[email protected]>
wrote:

> To be clear, I want the resulting selector for nationalityDropdown to try
> to find a match for both the id 'nationalityDropdown' and the class
> 'p-dropdown'
>
> --
> You received this message because you are subscribed to the Google Groups
> "Geb User Mailing List" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/geb-user/fc0772ad-86b0-468d-ac5e-371b69ec5a30%40googlegroups.com
> <https://groups.google.com/d/msgid/geb-user/fc0772ad-86b0-468d-ac5e-371b69ec5a30%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "Geb 
User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/geb-user/CA%2B52dQRpn9xdBFnT9xymhbvhYnQp_aanu%2BWTJsEz-_aKsqX9OA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to