- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā12-06-2024 05:02 AM
In UI Builder we have 2 similar components:
Pill: https://developer.servicenow.com/dev.do#!/reference/next-experience/xanadu/now-components/now-pill/u...
Pill List: https://developer.servicenow.com/dev.do#!/reference/next-experience/xanadu/shared-components/now-pil...
I need dynamic list of Pills (I never know how many Pills I need to display because this information is provided by REST response). And I need functionality like normal "Pill" has:
Selected [selected]
Indicates the selected state on default. If true, when the page is first opened, the user sees the toggle as selected or "on." Dismissible [canDismiss]
Displays a button at the end of the pill, which is used to dispatch an action. For example, an (X) button can be provided so the user can select the button to remove the pill. - Event Description
Pill selected set Dispatched when the user toggles the selected status of the Pill. Set the manage-selected property to override the default behavior and handle this action manually. Pill dismissed Dispatched when the user selects the pill dismiss button. The Pill component doesn't handle this action; its parent must handle it and remove the pill from its state so it's no longer rendered.
Why I can't configure those fields in "Pill List"? Is there any option to build component where I will provide by "Data Binding" array of objects and it will be an array of "Pills"?
I have case when on the left side of page I have "List Selector" component with avaliable Filters and I want to add "Pills" above search result like this:
And this list is dynamic.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā12-06-2024 01:10 PM
I am not sure why the pill list component doesn't support what you want, but perhaps you can work around the issue by using a repeater component to repeat over the list of pills instead?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā12-06-2024 01:10 PM
I am not sure why the pill list component doesn't support what you want, but perhaps you can work around the issue by using a repeater component to repeat over the list of pills instead?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā12-09-2024 12:36 AM
Hi @Kevin83 and Thank You! This is exacly what I need I already implement my functionality. This "Repeater" component is super usefull.