Removing first item in type array not working as expected
See original GitHub issueTest Schema:
"properties":
{
"users": {
"type": "array",
"description": "",
"title": "Users",
"items": {
"type": "object",
"dswaPath": ["lastName"],
"properties": {
"lastName": {
"type": "string",
"description": "Last name",
"minLength": 2,
"maxLength": 30
},
"firstName": {
"type": "string",
"description": "First name",
"minLength": 2,
"maxLength": 30
}
},
"fieldsets": [
{
"id": "fieldset-default",
"title": "Users",
"fields": [
"lastName",
"firstName"
]
}
]
}
}
},
"buttons": [{
"label": "Alert",
"id": "alert"
},
{
"label": "Reset",
"id": "reset"
}]
}
- Add two users.
- set User 1 first name to: John
- set User 2 first name to: Bob
- Click Remove Button under the first user
Expected result: Only user Bob will remain Actual result: user John remained
Tested by cloning from master and using “tests” directory.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:5
Top Results From Across the Web
How to remove all element from array except the first one in ...
You can set the length property of the array. var input = ['a','b','c','d','e','f']; input.length = 1; console.log(input);. Run code snippet
Read more >Array.prototype.shift() - JavaScript - MDN Web Docs
The shift() method removes the first element from an array and returns that removed element. This method changes the length of the array....
Read more >Removing Items from an Array in JavaScript
To remove an item from array via its index, we'll first introduce the Array.prototype.splice method and then investigate a better pattern using ...
Read more >about Arrays - PowerShell
An array is a data structure that is designed to store a collection of items. The items can be the same type or...
Read more >Removing elements: remove, clear, removeWhere
line 2 • The name 'int' isn't a type so it can't be used as a type argument. · line 9 • Expected...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Fixed using the @marc101101 solution. Thanks! Note: next time, make directly a pull request 😃
Same problem. This is a real bug