This is an automated email from the ASF dual-hosted git repository.
garbados pushed a commit to branch feat/partition-checkbox
in repository https://gitbox.apache.org/repos/asf/couchdb-fauxton.git
commit 92205330638d5923541e62c00b0be2a4f105ba3a
Author: Diana Thayer <ga...@gmail.com>
AuthorDate: Sun Mar 14 16:08:59 2021 -0700
feat: change partition option to checkbox
---
app/addons/databases/components.js | 19 +++++--------------
1 file changed, 5 insertions(+), 14 deletions(-)
diff --git a/app/addons/databases/components.js b/app/addons/databases/components.js
index 3e260f0..b8d7835 100644
--- a/app/addons/databases/components.js
+++ b/app/addons/databases/components.js
@@ -373,12 +373,8 @@ class AddDatabaseWidget extends React.Component {
);
}
- onSetNotPartitioned() {
- this.setState({ partitionedSelected: false });
- }
-
- onSetPartitioned() {
- this.setState({ partitionedSelected: true });
+ onTogglePartitioned() {
+ this.setState({ partitionedSelected: !this.state.partitionedSelected });
}
partitionedOption() {
@@ -400,16 +396,11 @@ class AddDatabaseWidget extends React.Component {
<div className='partitioned-db-options'>
<input
id="partitioned-db"
- type="radio"
+ type="checkbox"
checked={this.state.partitionedSelected === true}
- onChange={this.onSetPartitioned} />
+ onChange={this.onTogglePartitioned}
+ />
<label htmlFor="partitioned-db">Partitioned</label>
- <input
- id="non-partitioned-db"
- type="radio"
- checked={this.state.partitionedSelected === false}
- onChange={this.onSetNotPartitioned} />
- <label htmlFor="non-partitioned-db">Non-partitioned</label>
</div>
{partitionedDbHelp}
</div>