Skip to content

Commit

Permalink
๐Ÿ› fix: LeftControls ๅฑ•้–‹ๆ™‚ใซ textarea ใฎ autosize.update ใŒ่ตฐใ‚‹ใ‚ˆใ†ใซ
Browse files Browse the repository at this point in the history
  • Loading branch information
reiroop committed Feb 4, 2025
1 parent 1c799d4 commit 13a0424
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/components/Main/MainView/MessageInput/MessageInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@
:show-text-area-expand-button="showTextAreaExpandButton"

Check warning on line 32 in src/components/Main/MainView/MessageInput/MessageInput.vue

View check run for this annotation

Codecov / codecov/patch

src/components/Main/MainView/MessageInput/MessageInput.vue#L31-L32

Added lines #L31 - L32 were not covered by tests
:class="$style.leftControls"
@click-add-attachment="addAttachment"
@toggle-left-controls-expanded="

Check warning on line 35 in src/components/Main/MainView/MessageInput/MessageInput.vue

View check run for this annotation

Codecov / codecov/patch

src/components/Main/MainView/MessageInput/MessageInput.vue#L35

Added line #L35 was not covered by tests
textareaComponentRef?.textareaAutosizeRef?.autosizeUpdateTextarea
"
/>
<message-input-text-area
ref="textareaComponentRef"
Expand Down Expand Up @@ -153,13 +156,11 @@ const showKeyGuide = computed(
(sendWithModifierKey.value !== 'modifier' || canPostMessage.value)
)
const textareaComponentRef = ref<{
textareaAutosizeRef: { $el: HTMLTextAreaElement }
}>()
const textareaComponentRef = ref<InstanceType<typeof MessageInputTextArea>>()

Check warning on line 159 in src/components/Main/MainView/MessageInput/MessageInput.vue

View check run for this annotation

Codecov / codecov/patch

src/components/Main/MainView/MessageInput/MessageInput.vue#L159

Added line #L159 was not covered by tests
const containerEle = ref<HTMLDivElement>()
const { toggleStampPicker } = useTextStampPickerInvoker(
toRef(state, 'text'),
computed(() => textareaComponentRef.value?.textareaAutosizeRef.$el),
computed(() => textareaComponentRef.value?.textareaAutosizeRef?.$el),

Check warning on line 163 in src/components/Main/MainView/MessageInput/MessageInput.vue

View check run for this annotation

Codecov / codecov/patch

src/components/Main/MainView/MessageInput/MessageInput.vue#L163

Added line #L163 was not covered by tests
containerEle
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,13 @@ const emit = defineEmits<{
(e: 'update:isPreviewShown', _v: boolean): void
(e: 'clickAddAttachment'): void
(e: 'update:isInputTextAreaExpanded', _v: boolean): void
(e: 'toggleLeftControlsExpanded'): void
}>()
const { isMobile } = useResponsiveStore()
const toggleLeftControlsExpanded = () => {
emit('update:isLeftControlsExpanded', !props.isLeftControlsExpanded)
emit('toggleLeftControlsExpanded')
}
const toggleIsInputTextAreaExpanded = () => {
emit('update:isInputTextAreaExpanded', !props.isInputTextAreaExpanded)

Check warning on line 60 in src/components/Main/MainView/MessageInput/MessageInputLeftControls.vue

View check run for this annotation

Codecov / codecov/patch

src/components/Main/MainView/MessageInput/MessageInputLeftControls.vue#L55-L60

Added lines #L55 - L60 were not covered by tests
Expand Down

0 comments on commit 13a0424

Please sign in to comment.