Skip to content

Commit bbb0f6e

Browse files
authored
fix(channel-web): dropdown not rendering below message (#1764)
1 parent bdba56a commit bbb0f6e

File tree

5 files changed

+19
-5
lines changed

5 files changed

+19
-5
lines changed

modules/channel-web/assets/default-emulator.css

+5
Original file line numberDiff line numberDiff line change
@@ -718,6 +718,11 @@
718718
margin: 0.2rem 0.5rem;
719719
}
720720

721+
.bpw-in-message-quick_reply-dropdown {
722+
margin: 0.2rem 0.5rem;
723+
width: 200px;
724+
}
725+
721726
.bpw-composer {
722727
position: relative;
723728
outline: none;

modules/channel-web/assets/default.css

+5
Original file line numberDiff line numberDiff line change
@@ -644,6 +644,11 @@ body {
644644
margin: 0.2rem 0.5rem;
645645
}
646646

647+
.bpw-in-message-quick_reply-dropdown {
648+
margin: 0.2rem 0.5rem;
649+
width: 200px;
650+
}
651+
647652
.bpw-composer {
648653
border-top-width: 1px;
649654
border-top-style: solid;

modules/channel-web/src/views/lite/components/messages/renderer/Dropdown.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export const Dropdown = (props: Renderer.Dropdown) => {
3838

3939
const renderSelect = inKeyboard => {
4040
return (
41-
<div className={inKeyboard && 'bpw-keyboard-quick_reply-dropdown'}>
41+
<div className={(inKeyboard && 'bpw-keyboard-quick_reply-dropdown') || 'bpw-in-message-quick_reply-dropdown'}>
4242
<div style={{ width: props.width || '100%', display: 'inline-block' }}>
4343
{props.allowCreation ? (
4444
<Creatable

modules/hitlnext/assets/webchat-theme.css

+5
Original file line numberDiff line numberDiff line change
@@ -1026,6 +1026,11 @@
10261026
padding: var(--spacing-medium) 0;
10271027
text-transform: uppercase;
10281028
}
1029+
1030+
.bpw-in-message-quick_reply-dropdown {
1031+
margin: 0.2rem 0.5rem;
1032+
width: 200px;
1033+
}
10291034
}
10301035

10311036
.bpw-emulator-header-tab + div {

packages/ui-shared-lite/Payloads/index.ts

+3-4
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,11 @@ const renderChoicePayload = (content: sdk.ChoiceContent & ExtraChoiceProperties)
7070
component: 'Dropdown',
7171
message: content.text,
7272
buttonText: '',
73-
displayInKeyboard: true,
73+
displayInKeyboard: !content.displayInMessage,
7474
options: content.choices.map(c => ({ label: c.title, value: c.value?.toUpperCase() })),
75-
width: 300,
75+
width: !content.displayInMessage && 300,
7676
placeholderText: content.dropdownPlaceholder,
77-
disableFreeText: content.disableFreeText,
78-
displayInMessage: content.displayInMessage
77+
disableFreeText: content.disableFreeText
7978
}
8079
}
8180
return {

0 commit comments

Comments
 (0)