sfxcode / formkit-primevue

PrimeVue (v4, v3) support for the FormKit validation Framwork
https://sfxcode.github.io/formkit-primevue
85 stars 10 forks source link

ToggleButton component problem #14

Closed csakis closed 8 months ago

csakis commented 9 months ago

I am trying to customize the ToggleButton element. I can use the onLabel and the offLabel attributes just fine. However, the onClass and offClass attributes do not work.

sfxcode commented 9 months ago

Hi, as far as i know ToggleButton does not support the onClass and offClass ...

csakis commented 9 months ago

Yes. I know, but the primeToggleButton component still "supports" those attributes in this repo. I managed to solve my problem with a pass-through setting for the PrimeVue toggle button.

sfxcode commented 9 months ago

Not in the current Version:

      v-model="context._value"
      :input-id="context.id"
      :disabled="attrs._disabled ?? false"
      :readonly="attrs._readonly ?? false"
      :input-style="attrs.style"
      :input-class="styleClass"
      :tabindex="attrs.tabindex"
      :aria-label="attrs.ariaLabel"
      :aria-labelledby="attrs.ariaLabelledby"
      :on-label="attrs.onLabel ?? 'Yes'"
      :off-label="attrs.offLabel ?? 'No'"
      :on-icon="attrs.onIcon ?? 'pi pi-check'"
      :off-icon="attrs.offIcon ?? 'pi pi-times'"
      :icon-pos="attrs.iconPos ?? 'left'"
      :pt="attrs.pt"
      :pt-options="attrs.ptOptions"
      :unstyled="attrs.unstyled ?? false"
      @change="handleChange"
    />

Should i close ?

Greetings,

Tom