File tree Expand file tree Collapse file tree 4 files changed +7
-3
lines changed
components/features/annotation/container/fields Expand file tree Collapse file tree 4 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ These are the section headers that we use:
2323### Fixed
2424
2525- Fixed redirection problems after users sign-in using HF OAuth. ([ #5635 ] ( https://github.com/argilla-io/argilla/pull/5635 ) )
26+ - Fixed highlighting of the searched text in text and chat fields ([ #5678 ] ( https://github.com/argilla-io/argilla/pull/5678 ) )
2627
2728## [ 2.4.0] ( https://github.com/argilla-io/argilla/compare/v2.3.0...v2.4.0 )
2829
Original file line number Diff line number Diff line change 22 <div class =" chat" :key =" title" >
33 <span class =" chat__title" v-text =" title" />
44 <div
5+ :id =" `fields-content-${name}`"
56 class =" chat__wrapper"
67 :class =" checkIfAreLessThanTwoRoles ? '--simple' : '--multiple'"
78 >
Original file line number Diff line number Diff line change 1616 </BaseButton >
1717 </BaseActionTooltip >
1818 </div >
19- <div class =" content-area --body1" >
19+ <div :id = " `fields-content-${name}` " class =" content-area --body1" >
2020 <MarkdownRenderer v-if =" useMarkdown" :markdown =" fieldText" />
2121 <Sandbox v-else-if =" isHTML" :content =" fieldText" />
2222 <div v-else :class =" classes" v-html =" fieldText" />
Original file line number Diff line number Diff line change @@ -121,8 +121,10 @@ export const useSearchTextHighlight = (fieldId: string) => {
121121
122122 const highlightText = ( searchText : string ) => {
123123 const fieldComponent = document . getElementById ( FIELD_ID_TO_HIGHLIGHT ) ;
124- if ( ! searchText || ! fieldComponent ) return ;
125-
124+ if ( ! searchText || ! fieldComponent ) {
125+ CSS . highlights . delete ( HIGHLIGHT_CLASS ) ;
126+ return ;
127+ }
126128 const ranges = createRangesToHighlight ( fieldComponent , searchText ) ;
127129
128130 CSS . highlights . set ( HIGHLIGHT_CLASS , new Highlight ( ...ranges ) ) ;
You can’t perform that action at this time.
0 commit comments