fixes: table event - on search

This commit is contained in:
arpitnath 2023-09-12 14:18:41 +05:30
parent 1993359325
commit a7b48aabf3
3 changed files with 7 additions and 2 deletions

View file

@ -8,13 +8,14 @@ export const GlobalFilter = ({
component,
onEvent,
darkMode,
tableEvents,
}) => {
const [value, setValue] = React.useState(globalFilter);
const onChange = useAsyncDebounce((filterValue) => {
setValue(filterValue);
setGlobalFilter(filterValue || undefined);
onComponentOptionChanged(component, 'searchText', filterValue).then(() => {
onEvent('onSearch', { component, data: {} });
onEvent('onSearch', tableEvents, { component, data: {} });
});
}, 500);

View file

@ -927,6 +927,7 @@ export function Table({
component={component}
onEvent={onEvent}
darkMode={darkMode}
tableEvents={tableEvents}
/>
)}
<div>

View file

@ -501,7 +501,10 @@ const EditorComponent = (props) => {
};
//! Needs attention
const handleEvent = (eventName, event, options) => onEvent(editorRef, eventName, event, options, 'edit');
const handleEvent = (eventName, event, options) => {
console.log('--------arpit handleEvent:::', { eventName, event, options });
return onEvent(editorRef, eventName, event, options, 'edit');
};
const handleRunQuery = (queryId, queryName) => runQuery(editorRef, queryId, queryName);