mirror of
https://gitlab.com/MrFry/qmining-page
synced 2025-04-01 20:23:44 +02:00
Highlighting matched part in question search
This commit is contained in:
parent
f94b99e181
commit
1b3c07fce2
4 changed files with 48 additions and 27 deletions
|
@ -6,7 +6,7 @@ import styles from './Questions.module.css'
|
|||
|
||||
class Questions extends PureComponent {
|
||||
render() {
|
||||
const { subjs } = this.props
|
||||
const { subjs, searchTerm } = this.props
|
||||
|
||||
return (
|
||||
<div>
|
||||
|
@ -16,7 +16,13 @@ class Questions extends PureComponent {
|
|||
<div className={styles.questionBg} key={i}>
|
||||
<div className={styles.subjName}>{subj.Name}</div>
|
||||
{subj.Questions.map((question, i) => {
|
||||
return <Question key={i} question={question} />
|
||||
return (
|
||||
<Question
|
||||
key={i}
|
||||
question={question}
|
||||
searchTerm={searchTerm}
|
||||
/>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue