Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

CIcon "icon" not updating content #41

Copy link
Copy link
Open
@igoohd

Description

@igoohd
Issue body actions

In my nuxt app when I have a case that I want to change the icon according to a ref, but, even if the prop of CIcon (icon) is changing it doesn't update the content and re-render CIcon with the new value.

<template>
  <span class="tw-ml-2 tw-self-center">
    <CIcon
      :icon="currentIcon"
      size="xl"
      class="tw-cursor-pointer !tw-text-gray-500 tw-select-none"
      @click="togglePasswordVisibility"
    />
  </span>
</template>

<script lang="ts" setup>
const emit = defineEmits(['toggleInputType'])

const isHidden = ref(true)

const currentIcon = computed(() => {
  return isHidden.value ? cilLockLocked : cilLockUnlocked
})

const togglePasswordVisibility = () => {
  isHidden.value = !isHidden.value
  emit('toggleInputType')
}
</script>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.