Skip to content

Commit

Permalink
Fixed issue where mapping would instead use the last character of the…
Browse files Browse the repository at this point in the history
… actual event text
  • Loading branch information
AsbjoernJC committed Mar 20, 2024
1 parent f018538 commit ba781c2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 2 additions & 1 deletion TimeTrace/src/components/LogTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ function LogTable(props: LogTableProps) {
if (filteredValue === "" && eventText !== "") return;
const mapKey = props.events[mappingIndex];
props.mappings.set(mapKey, filteredValue);
console.log("props.mappings: ", props.mappings)
const newMappings = new Map(props.mappings);
if (props.setMappings) {
props.setMappings(newMappings);
Expand Down Expand Up @@ -59,7 +60,7 @@ function LogTable(props: LogTableProps) {
readOnly={props.mappingsAreEditable ? false : true}
value={props.mappings.get(props.events[i]) || ''}
onChange={(event) => {
handleMappingChange(props.events[i], i);
handleMappingChange(event.target.value, i);
}}
/>
{props.mappingsAreEditable ? (
Expand Down
2 changes: 0 additions & 2 deletions TimeTrace/src/pages/MappingsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,10 @@ function MappingsPage() {

function searchLog(query: string) {
if (query === "") {
console.log("filtered file lines = ", fileLines);
setFilteredFileLines(fileLines);
return;
};
const filteredFileLines = fileLines.filter((fileLine) => fileLine.toLowerCase().includes(query.toLowerCase()));
console.log("filtered file lines = ", filteredFileLines);
setFilteredFileLines(filteredFileLines);
}

Expand Down

0 comments on commit ba781c2

Please sign in to comment.