-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(#430) Table interactive select functionality
While this doesn't remove the jQuery Duallistbox library yet, this is the start of being able to do so. The changes here in combination with others in the repository allow for similar functionality, yet in an accessible way. This introduces the fuse.js library to help with search.
- Loading branch information
Showing
9 changed files
with
57 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
export const interactiveButtonGroup = () => { | ||
const buttonGroups = document.querySelectorAll('.btn-group-interactive'); | ||
if (buttonGroups.length === 0) { | ||
return; | ||
} | ||
|
||
buttonGroups.forEach(buttonGroup => { | ||
const buttons = buttonGroup.querySelectorAll('button'); | ||
buttons.forEach(button => { | ||
button.addEventListener('click', () => { | ||
buttons.forEach(b => { | ||
b.classList.remove('active'); | ||
b.setAttribute('aria-pressed', 'false'); | ||
}); | ||
|
||
button.classList.add('active'); | ||
button.setAttribute('aria-pressed', 'true'); | ||
}); | ||
}); | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,8 @@ | |
min-height: 45px; | ||
} | ||
|
||
a.btn { | ||
a.btn, | ||
label.btn { | ||
line-height: 1.9; | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters