nebius/SWE-rebench-V2-PRs huggingface dataset:
Repository: infernojs/inferno
Pull request #1468 (2019-04-24 13:40:45)

Do not render property 'selectedIndex' as attribute of element 'select' when this option passed
 *Before* submitting a PR please:
 - Include tests for the functionality you are adding! See CONTRIBUTING.md for details how to run tests.
 - Run `npm run build` and check that the build succeeds.
 - Ensure that the PR hasn't been submitted before.

---

Problem: Attribute `selectedIndex` rendered into node `select` when this option passed. It's not needed

![image](https://user-images.githubusercontent.com/37663273/56665635-150f1580-66b3-11e9-9b4d-3abaec6b3ed9.png)

It was introduced here: https://github.com/infernojs/inferno/pull/1425

To fix it added property `selectedIndex` to list of ignored properties of function `patchProp`


coveralls: 
[![Coverage Status](https://coveralls.io/builds/22997385/badge)](https://coveralls.io/builds/22997385)

Coverage remained the same at 95.065% when pulling **5d90fcbdac984652ed2a0ce32e01e5409fb1ac4d on abaksha-sc:master** into **c339047855f7584b3ee93a4962c00b4747a076c1 on infernojs:master**.

Havunen: Thanks for the PR! This change looks good to me :) lets merge it.

Patch:
diff --git a/packages/inferno/src/DOM/props.ts b/packages/inferno/src/DOM/props.ts
index 116514bd1..47b3bdd4f 100644
--- a/packages/inferno/src/DOM/props.ts
+++ b/packages/inferno/src/DOM/props.ts
@@ -82,6 +82,7 @@ export function patchProp(prop, lastValue, nextValue, dom: Element, isSVG: boole
     case 'key':
     case 'multiple':
     case 'ref':
+    case 'selectedIndex':
       break;
     case 'autoFocus':
       (dom as any).autofocus = !!nextValue;


Test patch:
diff --git a/packages/inferno/__tests__/select.spec.jsx b/packages/inferno/__tests__/select.spec.jsx
index 0fac8e8be..374989e1f 100644
--- a/packages/inferno/__tests__/select.spec.jsx
+++ b/packages/inferno/__tests__/select.spec.jsx
@@ -90,4 +90,20 @@ describe('Select selectedIndex', () => {
     expect(select.selectedIndex).toBe(3);
     expect(select.value).toBe('3');
   });
+
+  it('Should not render attribute selectedIndex', () => {
+    render(
+      <select selectedIndex={-1}>
+        <option value="0">Leonardo</option>
+        <option value="1">Donatello</option>
+        <option value="2">Rafael</option>
+        <option value="3">Michelangelo</option>
+        <option value="4">Splinter</option>
+      </select>,
+      container
+    );
+
+    const select = container.firstElementChild;
+    expect(select.getAttribute('selectedIndex')).toBe(null);
+  });
 });