mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-06 06:48:21 +00:00
Global search of table should be triggered only on enter
This commit is contained in:
parent
58f2375f75
commit
efbc428daa
2 changed files with 14 additions and 6 deletions
|
|
@ -457,11 +457,19 @@ export function Table({
|
|||
<div className="ms-2 d-inline-block">
|
||||
Search:{' '}
|
||||
<input
|
||||
value={value || ''}
|
||||
onChange={(e) => {
|
||||
defaultValue={value || ''}
|
||||
onBlur={(e) => {
|
||||
setValue(e.target.value);
|
||||
onChange(e.target.value);
|
||||
}}
|
||||
onKeyDown={(e) => {
|
||||
if(e.key === 'Enter') {
|
||||
setValue(e.target.value);
|
||||
onChange(e.target.value);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
placeholder={`${count} records`}
|
||||
style={{
|
||||
border: '0'
|
||||
|
|
|
|||
|
|
@ -9,9 +9,9 @@ export const componentTypes = [
|
|||
data: { type: 'code', displayName: 'Table data' },
|
||||
loadingState: { type: 'code', displayName: 'Loading state' },
|
||||
columns: { type: 'array', displayName: 'Table Columns' },
|
||||
serverSidePagination: { type: 'toggle', displayName: 'Server Side Pagination'},
|
||||
actionButtonBackgroundColor: { type: 'color', displayName: 'Background Color'},
|
||||
actionButtonTextColor: { type: 'color', displayName: 'Text Color'}
|
||||
serverSidePagination: { type: 'toggle', displayName: 'Server-side pagination'},
|
||||
actionButtonBackgroundColor: { type: 'color', displayName: 'Background color'},
|
||||
actionButtonTextColor: { type: 'color', displayName: 'Text color'}
|
||||
},
|
||||
defaultSize: {
|
||||
width: 810,
|
||||
|
|
@ -20,7 +20,7 @@ export const componentTypes = [
|
|||
events: {
|
||||
onRowClicked: { displayName: 'On row clicked'},
|
||||
onBulkUpdate: { displayName: 'Bulk update query'},
|
||||
onPageChanged: { displayName: 'On page changed query'}
|
||||
onPageChanged: { displayName: 'On page changed'}
|
||||
},
|
||||
styles: {
|
||||
textColor: { type: 'color', displayName: 'Text Color' }
|
||||
|
|
|
|||
Loading…
Reference in a new issue