Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow users to create their own wrappers #16743

Closed
wants to merge 1 commit into from
Closed

allow users to create their own wrappers #16743

wants to merge 1 commit into from

Conversation

erquhart
Copy link

This fixes #16718. Some layouts require the targeted input to remain siblings with other elements - this PR accommodates through the following changes:

  • allow the user to create their own wrapper div via the awesomplete-wrapper class
  • if an input bearing the awesomplete class does not have such a wrapper at runtime, Awesomplete will make one just as before, albeit with the awesomplete-wrapper class for consistency/simplicity
  • CSS selectors updated accordingly
  • docs updated as well (hopefully they work, you'll want to test)

My apologies for not writing tests for this, didn't have time to get to it.

className: "awesomplete",
around: input
});
this.container = input.parentNode.className.search(/awesomplete-wrapper/) >= 0 ?
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not classList.contains("awesomplete-wrapper")?
(if the answer is "browser support", IE9 can go fu…erm use a polyfill)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, that's why. Carries no real cost, so might as well.

@LeaVerou
Copy link
Owner

Good idea, thanks! See comments. Sorry for the delay in replying.

@TxHawks
Copy link
Contributor

TxHawks commented Nov 24, 2015

Has this been abandoned? I'd be happy to incorporate Lea's comments into this.

Should I just open a new pull request as there seem to be conflicts with current code?

@AlexDaniel
Copy link

@TxHawks you can fork @erquhart's repo and do your work there, then submit a pull request here.

@LeaVerou
Copy link
Owner

Yeah, this PR seems to be abandoned. :(
Closing, please send a new one.

@LeaVerou LeaVerou closed this Dec 27, 2015
@erquhart
Copy link
Author

Is there a conflict or just these style pref comments?

@LeaVerou
Copy link
Owner

Just these style pref comments :)

@erquhart
Copy link
Author

Cool. I moved to a different solution, but you're welcome to use the feature addition if someone wants to make the adaptations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Doesn't work with Materialize UI
5 participants