Skip to content

Commit 011c938

Browse files
jfboevericardo-a-alves-albjfboeve
authored
release v1.3.19 (#75)
* fix carousel so that the index that gets output is the data index instead of internal index * release v1.3.5 * grid: fix collectionwrapper validation to trigger onIndexChanged when it navigates on each element (#42) * Fixes carousel (#43) * fix typos in docs CarouselStepper * release v1.3.6 * collectionwrapper: remove condition to allow collectionwrapper to be self suficient to make requests (#47) * added requestItems method * fix(CollectionWrapper) change order in requestItems * update docs and change log. Release version 1.3.7 * Fix/keyboard nav (#57) * rework navigation function * fix docs * Feature/lazy load (#58) * request more feature * fix requestMore * resolve dataLength properly * change requestItems flow * fix _requestMore * apply fixes made by @ricardo-a-alves-alb * fix setting an index when there is no data * add options to Grid setIndex * fix removeAt; don't plotItems if there are none * add options to add and addAt functions * fix addAt setting wrong index * release version 1.3.8 * update package-lock * fix(Grid) reposition bug #69 * release v1.3.16 * Fix Carousel setIndex when component is inactive (#72) * fix carousel set index when component is inactive * collectionwrapper: add transition validation * release v1.3.17 * update changelog * sds * Update CHANGELOG.md * collectionwrapper: fix remove when last item is not a component (#74) * release v1.3.19 --------- Co-authored-by: ricardo-a-alves-alb <ricardo-a-alves@alticelabs.com> Co-authored-by: jfboeve <j.boeve@metrological.com> Co-authored-by: Ricardo Alves <96475496+ricardo-a-alves-alb@users.noreply.github.com>
1 parent 54540d7 commit 011c938

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
# Changelog
2+
*11 dec 2023*
3+
4+
## v1.3.19
5+
- When removing the last item from a CollectionWrapper using the remove method and that last item is out of bounds, no longer throws an error.
26

37
*17 nov 2023*
48
## v1.3.17 / v1.3.18

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@lightningjs/ui",
3-
"version": "1.3.18",
3+
"version": "1.3.19",
44
"description": "Standard UI components for Lightning",
55
"scripts": {
66
"release": "npm publish --access public",

src/helpers/CollectionWrapper.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -212,14 +212,10 @@ export default class CollectionWrapper extends Lightning.Component {
212212

213213
remove(target, options = {}) {
214214
if(this.hasItems && target.assignedID) {
215-
const itemWrappers = this.itemWrappers;
216215
for(let i = 0; i < this._items.length; i++) {
217216
let item = this._items[i];
218-
if(itemWrappers[i] && itemWrappers[i].component.isAlive) {
219-
item = itemWrappers[i].component;
220-
}
221217
if(target.assignedID === item.assignedID) {
222-
if(i === this._items.length-1 && item.hasFocus()) {
218+
if(i === this._items.length - 1 && this._index === this._items.length - 1) {
223219
this._index = this._index - 1;
224220
}
225221
return this.removeAt(i, 1, options);

0 commit comments

Comments
 (0)