dojo / widgets

:rocket: Dojo - UI widgets.
https://widgets.dojo.io
Other
88 stars 66 forks source link

ChipTypeahead wraps input to new line #1742

Open bitpshr opened 3 years ago

bitpshr commented 3 years ago

Bug

The ChipTypeahead wraps its input to a new line instead of keeping this inline with the actual chips. This worked prior to the changes introduces as party of #1697.

Package Version: latest

bitpshr commented 3 years ago

Leading TypeAhead content is wrapped within a styled span that does things like add margin and font styles required for most types of leading content to look good out-of-the-box. This is all good, but it means that the ChipTypeahead's use of TextInput is broken since these chips are now within a parent span, so the "inline" placement mode is not actually inline (chips are one level lower than the input, so wrapping does not work as expected.) TDLR; there's no way to get chips within a parent to wrap inline with a sibling of that parent, and this is only an issue now that leading content is wrapped for better OOTB styling. I'm struggling to think of a solution that supports the ChipTypeahead's use case ("do not wrap my leading content") while not being hacky (e.g. a wrapLeadiing boolean property, gross.)

cc @agubler @matt-gadd