File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
client/packages/lowcoder/src/pages/datasource Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -119,12 +119,18 @@ export const DatasourceList = () => {
119
119
elements : DatasourceInfo [ ] ;
120
120
total : number ;
121
121
}
122
- console . log ( datasource ) ;
123
122
124
123
const [ elements , setElements ] = useState < ElementsState > ( { elements : [ ] , total : 0 } ) ;
125
124
const [ currentPage , setCurrentPage ] = useState ( 1 ) ;
126
125
const [ pageSize , setPageSize ] = useState ( 10 ) ;
127
126
127
+ useEffect ( ( ) => {
128
+ setTimeout ( ( ) => {
129
+ if ( searchValue . length > 2 || searchValue === "" )
130
+ setSearchValues ( searchValue )
131
+ } , 500 ) ;
132
+ } )
133
+
128
134
useEffect ( ( ) => {
129
135
fetchDatasourcePagination (
130
136
{
@@ -174,7 +180,6 @@ export const DatasourceList = () => {
174
180
placeholder = { trans ( "search" ) }
175
181
value = { searchValue }
176
182
onChange = { ( e ) => setSearchValue ( e . target . value ) }
177
- onEnterPress = { ( value ) => setSearchValues ( value ) }
178
183
style = { { width : "192px" , height : "32px" , margin : "0 12px 0 0" } } />
179
184
< AddBtn buttonType = { "primary" } onClick = { ( ) => showCreateForm ( true ) } >
180
185
{ trans ( "home.newDatasource" ) }
You can’t perform that action at this time.
0 commit comments