mirror of
https://github.com/hanzoai/react.git
synced 2026-09-24 17:02:27 +00:00
This reverts commit 0e9a7575ce.
This commit is contained in:
committed by
Dan Abramov
parent
d5e3b1355b
commit
2d95fa26fe
+9
-9
@@ -440,9 +440,9 @@ describe('ReactDOMSelect', () => {
|
||||
</select>
|
||||
);
|
||||
const markup = ReactDOMServer.renderToString(stub);
|
||||
expect(markup).toContain('<option selected value="giraffe"');
|
||||
expect(markup).not.toContain('<option selected value="monkey"');
|
||||
expect(markup).not.toContain('<option selected value="gorilla"');
|
||||
expect(markup).toContain('<option selected="" value="giraffe"');
|
||||
expect(markup).not.toContain('<option selected="" value="monkey"');
|
||||
expect(markup).not.toContain('<option selected="" value="gorilla"');
|
||||
});
|
||||
|
||||
it('should support server-side rendering with defaultValue', () => {
|
||||
@@ -454,9 +454,9 @@ describe('ReactDOMSelect', () => {
|
||||
</select>
|
||||
);
|
||||
const markup = ReactDOMServer.renderToString(stub);
|
||||
expect(markup).toContain('<option selected value="giraffe"');
|
||||
expect(markup).not.toContain('<option selected value="monkey"');
|
||||
expect(markup).not.toContain('<option selected value="gorilla"');
|
||||
expect(markup).toContain('<option selected="" value="giraffe"');
|
||||
expect(markup).not.toContain('<option selected="" value="monkey"');
|
||||
expect(markup).not.toContain('<option selected="" value="gorilla"');
|
||||
});
|
||||
|
||||
it('should support server-side rendering with multiple', () => {
|
||||
@@ -468,9 +468,9 @@ describe('ReactDOMSelect', () => {
|
||||
</select>
|
||||
);
|
||||
const markup = ReactDOMServer.renderToString(stub);
|
||||
expect(markup).toContain('<option selected value="giraffe"');
|
||||
expect(markup).toContain('<option selected value="gorilla"');
|
||||
expect(markup).not.toContain('<option selected value="monkey"');
|
||||
expect(markup).toContain('<option selected="" value="giraffe"');
|
||||
expect(markup).toContain('<option selected="" value="gorilla"');
|
||||
expect(markup).not.toContain('<option selected="" value="monkey"');
|
||||
});
|
||||
|
||||
it('should not control defaultValue if readding options', () => {
|
||||
|
||||
+1
-1
@@ -90,7 +90,7 @@ export function createMarkupForProperty(name, value) {
|
||||
propertyInfo.hasBooleanValue ||
|
||||
(propertyInfo.hasOverloadedBooleanValue && value === true)
|
||||
) {
|
||||
return attributeName;
|
||||
return attributeName + '=""';
|
||||
} else if (
|
||||
typeof value !== 'boolean' ||
|
||||
shouldAttributeAcceptBooleanValue(name)
|
||||
|
||||
Reference in New Issue
Block a user