Skip to content

Commit

Permalink
minor updates, fixes some small bugs and upgraded packages.
Browse files Browse the repository at this point in the history
  • Loading branch information
replaysMike committed Mar 13, 2024
1 parent 1eb1de2 commit e3f2b8d
Show file tree
Hide file tree
Showing 10 changed files with 1,255 additions and 632 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -538,3 +538,4 @@ $RECYCLE.BIN/
# End of https://www.gitignore.io/api/csharp,windows,visualstudio
Binner/BinnerInstaller/BinnerSetup.exe
Binner/Binner.Web/ClientApp/.vscode/settings.json
*.bak
1,612 changes: 1,099 additions & 513 deletions Binner/Binner.Web/ClientApp/package-lock.json

Large diffs are not rendered by default.

19 changes: 11 additions & 8 deletions Binner/Binner.Web/ClientApp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,32 @@
"private": true,
"dependencies": {
"@artsy/fresnel": "^6.1.0",
"@emotion/react": "^11.10.6",
"@emotion/styled": "^11.10.6",
"@mui/icons-material": "^5.11.16",
"@mui/lab": "^5.0.0-alpha.126",
"@mui/material": "^5.12.2",
"@emotion/react": "^11.11.4",
"@emotion/styled": "^11.11.0",
"@mui/icons-material": "^5.15.12",
"@mui/material": "^5.15.12",
"@mui/x-tree-view": "^6.17.0",
"@types/node": "^18.15.11",
"awesome-debounce-promise": "^2.1.0",
"axios": "^1.3.4",
"babel-eslint": "^10.0.3",
"bootstrap": "^5.2.3",
"brace": "^0.11.1",
"buffer": "^6.0.3",
"build": "^0.1.4",
"chartist": "^1.3.0",
"cleave.js": "^1.6.0",
"crypto-browserify": "^3.12.0",
"crypto-js": "^4.1.1",
"currency-symbol-map": "^5.1.0",
"date-fns": "^2.29.3",
"emotion": "^11.0.0",
"env-cmd": "^10.1.0",
"fast-json-stringify": "^5.6.2",
"flatpickr": "^4.6.13",
"fs-extra": "^11.1.1",
"history": "^5.3.0",
"i18next": "^22.4.14",
"i18next": "^22.4.15",
"i18next-browser-languagedetector": "^7.0.1",
"i18next-http-backend": "^2.2.0",
"imagesloaded": "^5.0.0",
Expand All @@ -42,7 +44,7 @@
"lightgallery.js": "^1.4.0",
"lodash": "^4.17.21",
"lodash.debounce": "^4.0.8",
"material-react-table": "^1.11.0",
"material-react-table": "^1.11.1",
"merge": "^2.1.1",
"nouislider": "^15.7.0",
"npm": "^9.6.4",
Expand All @@ -59,7 +61,8 @@
"react-dnd-html5-backend": "^16.0.1",
"react-dom": "^18.2.0",
"react-dropzone": "^14.2.3",
"react-i18next": "^12.2.0",
"react-ga": "^3.3.1",
"react-i18next": "^12.2.2",
"react-icons": "^4.8.0",
"react-image-crop": "^10.0.9",
"react-loading-icons": "^1.1.0",
Expand Down
15 changes: 14 additions & 1 deletion Binner/Binner.Web/ClientApp/src/components/NumberPicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,20 @@ export default class NumberPicker extends Component {
this.handleWheel = this.handleWheel.bind(this);
this.validateInput = this.validateInput.bind(this);
this.handleSetValue = this.handleSetValue.bind(this);
this.inputRef = React.createRef();
this.preventDefault = e => e.preventDefault();
}

componentDidMount() {
this.inputRef.current.addEventListener('wheel', this.preventDefault, { passive: true });
}

componentWillUnmount () {
this.inputRef.current.removeEventListener('wheel', this.preventDefault, { passive: true });
}

handleWheel(event, v) {
event.preventDefault();
event.stopPropagation();
const direction = event.deltaY !== 0 ? (event.deltaY > 0 ? 1 : -1) : 0;
let currentValue = event.currentTarget.value.replace(",", ".");
let stepSize = this.props.step;
Expand All @@ -74,6 +84,7 @@ export default class NumberPicker extends Component {
default:
break;
}
return false;
}

handleAction(event, v) {
Expand Down Expand Up @@ -151,6 +162,7 @@ export default class NumberPicker extends Component {
<Button {...display} type="button" icon="minus" onClick={this.handleAction} name={DECREASE_VALUE} style={style.buttonLeft} disabled={value <= min} />
<input
type="text"
className="noscroll"
name={name}
min={min}
max={max}
Expand All @@ -164,6 +176,7 @@ export default class NumberPicker extends Component {
onWheel={this.handleWheel}
style={style.input}
autoComplete={autoComplete}
ref={this.inputRef}
/>
<Button {...display} type="button" icon="plus" onClick={this.handleAction} name={INCREASE_VALUE} style={style.buttonRight} disabled={value >= max} />
</Input>
Expand Down
Loading

0 comments on commit e3f2b8d

Please sign in to comment.