[ARVADOS-WORKBENCH2] updated: 1.2.0-641-ga764ad3
Git user
git at public.curoverse.com
Sat Oct 13 13:26:59 EDT 2018
Summary of changes:
src/components/chips-input/chips-input.tsx | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
via a764ad3d8c7c859ac9c2dd3e6fbd2350e3d51358 (commit)
from 5abc704e5a7415a6f5d2940cd9a195d983bf70dc (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit a764ad3d8c7c859ac9c2dd3e6fbd2350e3d51358
Author: Michal Klobukowski <michal.klobukowski at contractors.roche.com>
Date: Sat Oct 13 19:26:43 2018 +0200
Fix inifite render loop
Feature #14229
Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski <michal.klobukowski at contractors.roche.com>
diff --git a/src/components/chips-input/chips-input.tsx b/src/components/chips-input/chips-input.tsx
index 210feae..6a3142b 100644
--- a/src/components/chips-input/chips-input.tsx
+++ b/src/components/chips-input/chips-input.tsx
@@ -42,6 +42,10 @@ export const ChipsInput = withStyles(styles)(
filler = React.createRef<HTMLDivElement>();
timeout = -1;
+ componentDidMount() {
+ this.updateCursorPosition();
+ }
+
setText = (event: React.ChangeEvent<HTMLInputElement>) => {
this.setState({ text: event.target.value });
}
@@ -75,11 +79,19 @@ export const ChipsInput = withStyles(styles)(
this.timeout = setTimeout(() => this.forceUpdate());
}
+ componentDidUpdate(prevProps: ChipsInputProps<Value>){
+ if(prevProps.values !== this.props.values){
+ this.updateCursorPosition();
+ }
+ }
+
render() {
- this.updateCursorPosition();
return <>
<div className={this.props.classes.chips}>
- <Chips {...this.props} filler={<div ref={this.filler} />} />
+ <Chips
+ {...this.props}
+ filler={<div ref={this.filler} />}
+ />
</div>
<Input
value={this.state.text}
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list