[Bugfix]: Allow firing onSearch event of Table widget irrespective of server-side search is set to true or false. (#2660)

* resolves onsearch event for cliendside search

* removes un-used props
This commit is contained in:
Arpit 2022-04-18 23:39:41 +05:30 committed by GitHub
parent 5c3d8ffa71
commit 9b285dacf5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -7,7 +7,6 @@ export const GlobalFilter = ({
setGlobalFilter,
onComponentOptionChanged,
component,
serverSideSearch,
onEvent,
}) => {
const count = preGlobalFilteredRows.length;
@ -21,9 +20,7 @@ export const GlobalFilter = ({
onChange(text);
onComponentOptionChanged(component, 'searchText', text).then(() => {
if (serverSideSearch === true) {
onEvent('onSearch', { component, data: {} });
}
onEvent('onSearch', { component, data: {} });
});
};