Skip to content

Commit

Permalink
Fix slice row ui when delete entry in start or end index (#239)
Browse files Browse the repository at this point in the history
Co-authored-by: Tio Pramayudi <[email protected]>
  • Loading branch information
tiopramayudi and tiopramayudi authored Apr 12, 2022
1 parent 55a1c7a commit feb9cef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const SliceRow = ({ sliceRow, onChangeHandler, errors = {} }) => {
fullWidth>
<EuiFieldText
placeholder="Start Index"
value={!!sliceRow && sliceRow.start ? sliceRow.start : "null"}
value={!!sliceRow && sliceRow.start ? sliceRow.start : ""}
onChange={e => onChange("start")(e.target.value)}
isInvalid={!!errors.name}
name={`start`}
Expand All @@ -48,7 +48,7 @@ export const SliceRow = ({ sliceRow, onChangeHandler, errors = {} }) => {
fullWidth>
<EuiFieldText
placeholder="End Index"
value={!!sliceRow && sliceRow.end ? sliceRow.end : "null"}
value={!!sliceRow && sliceRow.end ? sliceRow.end : ""}
onChange={e => onChange("end")(e.target.value)}
isInvalid={!!errors.name}
name={`end`}
Expand Down
4 changes: 2 additions & 2 deletions ui/src/services/transformer/TransformerConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -419,10 +419,10 @@ export class Pipeline {
}
if (step.operation === "sliceRow") {
if (step.sliceRow) {
if (step.sliceRow.start) {
if (step.sliceRow.start !== undefined) {
step.sliceRow.start = parseInt(step.sliceRow.start);
}
if (step.sliceRow.end) {
if (step.sliceRow.end !== undefined) {
step.sliceRow.end = parseInt(step.sliceRow.end);
}
}
Expand Down

0 comments on commit feb9cef

Please sign in to comment.