widgets icon indicating copy to clipboard operation
widgets copied to clipboard

ChipTypeahead wraps input to new line

Open bitpshr opened this issue 3 years ago • 1 comments

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 avatar Apr 12 '21 15:04 bitpshr

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

bitpshr avatar Apr 15 '21 12:04 bitpshr