fix: update search column input on param change (#34951)
This commit is contained in:
parent
b10fde673d
commit
076005eae2
1 changed files with 5 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
||||||
import { useCallback, useState, useRef } from 'react';
|
import { useCallback, useState, useRef, useEffect } from 'react';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
defineMessages,
|
defineMessages,
|
||||||
|
@ -72,6 +72,10 @@ export const Search: React.FC<{
|
||||||
const [expanded, setExpanded] = useState(false);
|
const [expanded, setExpanded] = useState(false);
|
||||||
const [selectedOption, setSelectedOption] = useState(-1);
|
const [selectedOption, setSelectedOption] = useState(-1);
|
||||||
const [quickActions, setQuickActions] = useState<SearchOption[]>([]);
|
const [quickActions, setQuickActions] = useState<SearchOption[]>([]);
|
||||||
|
useEffect(() => {
|
||||||
|
setValue(initialValue ?? '');
|
||||||
|
setQuickActions([]);
|
||||||
|
}, [initialValue]);
|
||||||
const searchOptions: SearchOption[] = [];
|
const searchOptions: SearchOption[] = [];
|
||||||
|
|
||||||
if (searchEnabled) {
|
if (searchEnabled) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue