Skip to content

Commit

Permalink
Fixed bugs (#99)
Browse files Browse the repository at this point in the history
* Fixed bugs

- Changed transitions to 50ms so that it doesnt break
- Disabled clicks to checkbox and edit buttons propagating to row select

* Adjust sidebar speed

---------

Co-authored-by: McNaBry <[email protected]>
  • Loading branch information
LimZiJia and McNaBry authored Nov 13, 2024
1 parent de92e85 commit deb6415
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
7 changes: 4 additions & 3 deletions frontend/src/app/questions/questions.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ <h3 class="m-0">Questions</h3>
<ng-template pTemplate="body" let-question>
<tr (click)="onRowSelect(question)">
@if (isAdmin) {
<td><p-tableCheckbox [value]="question" /></td>
<td (click)="$event.stopPropagation()"><p-tableCheckbox [value]="question" /></td>
<td>{{ question.id }}</td>
<td>{{ question.title }}</td>
<td>{{ question.topics.join(', ') }}</td>
Expand All @@ -88,7 +88,7 @@ <h3 class="m-0">Questions</h3>
icon="pi pi-file-edit"
class="mr-2"
[text]="true"
(onClick)="editQuestion(question)" />
(onClick)="$event.stopPropagation(); editQuestion(question)" />
</td>
} @else {
<td>{{ question.id }}</td>
Expand Down Expand Up @@ -118,7 +118,8 @@ <h3 class="m-0">Questions</h3>
position="right"
[blockScroll]="true"
styleClass="w-10 md:w-4"
transitionOptions="300ms cubic-bezier(0, 0, 0.2, 1)">
transitionOptions="200ms cubic-bezier(0, 0, 0.2, 1)"
(onHide)="closePanel()">
<ng-template pTemplate="header">
<h3>{{ clickedOnQuestion?.title }}</h3>
</ng-template>
Expand Down
4 changes: 1 addition & 3 deletions frontend/src/app/questions/questions.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,7 @@ export class QuestionsComponent implements OnInit {

onRowSelect(question: Question) {
this.clickedOnQuestion = question;
if (!this.isDialogVisible) {
this.isPanelVisible = true;
}
this.isPanelVisible = true;
}

closePanel() {
Expand Down

0 comments on commit deb6415

Please sign in to comment.