MCPcopy Index your code
hub / github.com/bugy/script-server / setChipListValue

Function setChipListValue

web-src/tests/unit/test_utils.js:90–98  ·  view source on GitHub ↗
(chipListComponent, value)

Source from the content-addressed store, hash-verified

88}
89
90export function setChipListValue(chipListComponent, value) {
91 const chipList = M.Chips.getInstance($(chipListComponent.$el).find('.chips').get(0));
92 while (chipList.chipsData.length > 0) {
93 chipList.deleteChip(0);
94 }
95 for (const valueElement of value) {
96 chipList.addChip({'tag': valueElement});
97 }
98}
99
100export function createVue(component, properties, store = null, vue = null) {
101 document.body.insertAdjacentHTML('afterbegin', '<div id="top-level-element"></div>');

Callers 1

setValueByUserFunction · 0.90

Calls 1

getMethod · 0.45

Tested by

no test coverage detected