I have a 'veryBigArrayWithData' that can have thousands of records.
When clicking on a lightning-combobox to load label-value pairs from this array, the page becomes unresponsive due to the big processing taking place in order to load the hole dropdown list.
Is there a way to lazy load the records from the array that are shown, so when the user scrolls down more records appear? Loading 100 records at a time would work okay for example.
html:
<lightning-combobox variant="label-hidden" name="options combobox" label="Options combobox" value={selectedValue} placeholder="Select Value" options={options} onchange={handleChange} > </lightning-combobox> js:
this.options = [] this.options.push({ label: 'Select Contact', value: '' }) for (let i = 0; i < this.veryBigArrayWithData.length ; i++) { const newOption = this.veryBigArrayWithData[i] this.options.push({ label: newOption.Name, value: newOption.Id }) }