Hi all,
currently migrating fro PF7 to PF11 and latest Mirage template, I have a problem with inputSwitch that display as toggleSwitch (so : no on/off labels ......).
Is there any issue with this component (still exist in documentation but not in showcase ...)
Kindest regards
Mirage and inputSwitch displayed as toggleswitch
Forum rules
Please note that response time for technical support is within 3-5 business days.
Please note that response time for technical support is within 3-5 business days.
-
- Posts: 5281
- Joined: 29 Jun 2013, 12:38
Hi,
It is by design for ToggleSwitch. Maybe, you can create an issue about it on Github.
Best Regards,
It is by design for ToggleSwitch. Maybe, you can create an issue about it on Github.
Best Regards,
Github Profile: https://github.com/mertsincan
Hi,
Thanks for the answer.
I didn't understand exactly what you mean :
Is it that inputSwitch is displayed exactly as a toogleSwitch (so inputSwitch does not exist any more as a distinct component) ? but it is still documented in documentation ...
Is it a Mirage behavior or a primefaces one (there are no input switch in mirage live demo or in Primefaces showcase) ?
I join a screenshot of differences :
Kindest regards
Thanks for the answer.
I didn't understand exactly what you mean :
Is it that inputSwitch is displayed exactly as a toogleSwitch (so inputSwitch does not exist any more as a distinct component) ? but it is still documented in documentation ...
Is it a Mirage behavior or a primefaces one (there are no input switch in mirage live demo or in Primefaces showcase) ?
I join a screenshot of differences :
Kindest regards
-
- Posts: 5281
- Joined: 29 Jun 2013, 12:38
Sorry for the confusion! Please try;
You can override it according to your needs.
Test;
Also, please see this issue: https://github.com/primefaces/primefaces/issues/3906
Best Regards,
Code: Select all
<style>
body .ui-inputswitch .ui-inputswitch-off span, body .ui-inputswitch .ui-inputswitch-on span {
visibility: visible;
}
body .ui-inputswitch .ui-inputswitch-on {
visibility: visible;
color: var(--primary-color-text);
}
body .ui-inputswitch {
height: 28px;
width: 54px !important;
border-radius: 4px;
}
body .ui-inputswitch .ui-inputswitch-handle {
margin-left: 4px;
}
body .ui-inputswitch.ui-inputswitch-checked .ui-inputswitch-handle {
margin-left: -4px;
}
body .ui-inputswitch .ui-inputswitch-handle {
top: 50%;
margin-top: -10px;
border-radius: 4px;
border: 0 none;
}
body .ui-inputswitch .ui-inputswitch-on, body .ui-inputswitch .ui-inputswitch-off {
top: 2px;
}
</style>
Test;
Code: Select all
<p:inputSwitch onLabel="On" offLabel="off" />
Best Regards,
Github Profile: https://github.com/mertsincan
-
- Posts: 5281
- Joined: 29 Jun 2013, 12:38
Thanks a lot for the update!
Note: inputSwitch will be deprecated. But, you can use it for a long time.
Best Regards,
- Yes, you can override my shared CSS above. Also, I'll try to add it to the next version.Can we achieve better ...
Note: inputSwitch will be deprecated. But, you can use it for a long time.
Best Regards,
Github Profile: https://github.com/mertsincan
-
- Information
-
Who is online
Users browsing this forum: No registered users and 1 guest