Skip to content
This repository was archived by the owner on Jun 17, 2023. It is now read-only.

Commit 663551b

Browse files
tankorsmasheddywashere
authored andcommitted
fix(ButtonDropdown): allow overwriting the group prop (reactstrap#425)
* fix(ButtonDropdown) group={false} did nothing The underlying Object.assign needs to have the overrides to the right it seems like ```function example(){ let props = {group: "FROM PROPERTIES" }; let propsOverwritten = Object.assign({}, props, {'group': "group from defaults"}); console.log("props first, groups overwritten", propsOverwritten); let notOverwritten = Object.assign({}, {'group': "group from defaults"}, props); console.log("groups first, overwritten by props as intended", notOverwritten); } example() ``` ES6 example https://es6console.com/j2paoelc/ Not crazy sure, but I changed the order in `reactstrap.es.js` of `g,{group:!0}` and it worked, so this seems like it would have the appropriate affect. * fix extra space * add space to fix lint rule
1 parent 22d5c3f commit 663551b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ButtonDropdown.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const propTypes = {
88

99
const ButtonDropdown = (props) => {
1010
return (
11-
<Dropdown {...props} group />
11+
<Dropdown group {...props} />
1212
);
1313
};
1414

0 commit comments

Comments
 (0)