Can the "clear" button on a record picker input be removed?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2019 06:58 AM
I'm using a sn-record-picker on a service portal widget. When an option is selected and the box is filled an 'x' is added to the input that allows a user to clear it. Can this 'x' be removed or prevented from showing up?
Labels:
- Labels:
-
Service Portal Development
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2019 08:49 AM
Not sure of the reason for needing to remove the quick ability to clear the input, but add this to your widget's CSS -
.select2-container.select2-allowclear .select2-choice abbr{
display: none !important;
}
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2020 02:48 PM
Probably a bit late but if you add the following to your "settings" in the record-picker setup it will remove the ability to clear.
options="{allowClear: false}"