Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[9.0] [controls] fix Korean characters split into 2 characters with space in between when typing in options list search input (#213164) #213179

Merged
merged 1 commit into from
Mar 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ export const useBatchedOptionalPublishingSubjects = <
* Batches the latest values of multiple publishing subjects into a single object. Use this to avoid unnecessary re-renders.
* Use when `subjects` are static and do not change over the lifetime of the component.
*
* Do not use when value is used as an input value to avoid debouncing user interactions
*
* @param subjects Publishing subjects array.
*/
export const useBatchedPublishingSubjects = <
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ import {
EuiText,
EuiToolTip,
} from '@elastic/eui';
import { useBatchedPublishingSubjects } from '@kbn/presentation-publishing';
import {
useBatchedPublishingSubjects,
useStateFromPublishingSubject,
} from '@kbn/presentation-publishing';

import { getCompatibleSearchTechniques } from '../../../../../common/options_list/suggestions_searching';
import { useOptionsListContext } from '../options_list_context_provider';
Expand All @@ -36,16 +39,18 @@ export const OptionsListPopoverActionBar = ({
}: OptionsListPopoverProps) => {
const { api, stateManager, displaySettings } = useOptionsListContext();

// Using useStateFromPublishingSubject instead of useBatchedPublishingSubjects
// to avoid debouncing input value
const searchString = useStateFromPublishingSubject(stateManager.searchString);

const [
searchString,
searchTechnique,
searchStringValid,
invalidSelections,
totalCardinality,
field,
allowExpensiveQueries,
] = useBatchedPublishingSubjects(
stateManager.searchString,
stateManager.searchTechnique,
stateManager.searchStringValid,
api.invalidSelections$,
Expand Down