Let's say I have a reusable module for custom dropdown elements:
class Dropdown extends Module {
static base = {
$("p-dropdown")
}
}
and I have a page, with a 'modal' added to it. This modal has multiple
dropdowns.
Each modal has its own identifier. What would be the best practice to add this
to the content?
I do not wish to create additional classes for each type of dropdown that
extends the Dropdown class above.
class customModal extends Module {
static base = { $(".modal.is-active") }
static content = {
body(wait: true) {$(".modal-card-body")}
nationalityDropdown(wait: true) {
body.find("#nationalityDropdown").module(Dropdown) }
genderDropdown(wait: true) { body.find("#genderDropdown").module(Dropdown) }
}
}
(note: the naming is altered to keep it simple. Not exact code in project.)
What would be perfect if I could add content to my customModal something like
this:
nationalityDropdown(wait: true) { module(Dropdown).where{ id:
> "nationalityDropdown") } }
--
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/dc17d562-6eec-4ee2-b6a2-619191129254%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.