Skip to content

Commit 7e37740

Browse files
author
Bart Hazen
committed
Fix loading and adjusting of classifiers.
1 parent a3946e5 commit 7e37740

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

src/pages/Homepage/Homepage.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,5 @@
33
Python Create helps you in bringing your Python skills to the next level. This is just a starting point,
44
where we'll introduce you our one and only super helpful generator for `setup.py` files.
55

6-
This website has been developed by Python-enthusiasts,
7-
lacking of serious web development skills,
6+
This website has been developed by Python-enthusiasts, lacking of serious web development skills,
87
yet wanting to experiment a bit with React.

src/pages/SetupPy/SetupPy-intro.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
# `setup.py` generator
22

3-
Setting up your project with a proper `setup.py` can be a pain in the buttocks.
3+
Setting up your project with a proper `setup.py` can be a pain in the buttocks. This tool
4+
helps you to get started with your Python project.

src/pages/SetupPy/index.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export default class SetupPy extends React.Component {
2626
url: "",
2727
authorEmail: "hank@pythoncreate.com",
2828
description: "Description of the project.",
29-
classifiers: [],
29+
classifiers: [pythonClassifiers[0], pythonClassifiers[400], pythonClassifiers[724]],
3030
version: "0.0.1",
3131
requirements: "setuptools>=45.0",
3232
srcFolder: true,
@@ -290,9 +290,9 @@ export default class SetupPy extends React.Component {
290290
/>
291291
<Autocomplete
292292
multiple
293-
id="classifiers-outlined"
293+
id="classifiers"
294294
options={pythonClassifiers}
295-
defaultValue={[pythonClassifiers[0], pythonClassifiers[400], pythonClassifiers[724]]}
295+
defaultValue={this.state.classifiers}
296296
filterSelectedOptions
297297
renderInput={(params) => (
298298
<TextField
@@ -301,6 +301,10 @@ export default class SetupPy extends React.Component {
301301
label="Select classifiers"
302302
/>
303303
)}
304+
onChange={(_, v) => {
305+
console.log(v);
306+
this.setState({ classifiers: v || this.defaultValue }, this.updatePythonCode);
307+
}}
304308
/>
305309
</FormGroup>
306310
</Grid>

0 commit comments

Comments
 (0)