-
Notifications
You must be signed in to change notification settings - Fork 0
Get rid of "disabled" on fields in BasicSettings. #34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,7 +30,6 @@ function BasicSettings({ hidden, role, store }) { | |
| label={t("guideangle")} | ||
| type="number" | ||
| value={store.guideline.angle} | ||
| disabled={store.ratio !== "custom"} | ||
| onChange={(e) => store.setGuidelineAngle(e.target.value)} | ||
|
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ✅ This suggestion is also already handled by the store implementation! Looking at the store code (SHA 1074b77), setGuidelineAngle(angle) {
this.guideline.angle = Math.min(Math.max(angle, 15), 90);
if (this.ratio !== "custom") this.setRatioPreset("custom");
}The current implementation |
||
| slotProps={{ | ||
| input: { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,7 +22,6 @@ function RatiosInput({ store }) { | |
| <Input | ||
| type="number" | ||
| value={r} | ||
| disabled={store.ratio !== "custom"} | ||
| onChange={(e) => store.setRatio(i, e.target.value)} | ||
kylev marked this conversation as resolved.
Show resolved
Hide resolved
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ✅ This suggestion is already handled by the store implementation! Looking at the store code (SHA 1074b77), setRatio(index, value) {
this.ratios[index] = Math.min(Math.max(value, 0), 20);
if (this.ratio !== "custom") this.setRatioPreset("custom");
}So the current implementation |
||
| style={{ marginTop: 16, width: 60 }} | ||
| /> | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.