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 = () => {
119119 elements : DatasourceInfo [ ] ;
120120 total : number ;
121121 }
122- console . log ( datasource ) ;
123122
124123 const [ elements , setElements ] = useState < ElementsState > ( { elements : [ ] , total : 0 } ) ;
125124 const [ currentPage , setCurrentPage ] = useState ( 1 ) ;
126125 const [ pageSize , setPageSize ] = useState ( 10 ) ;
127126
127+ useEffect ( ( ) => {
128+ setTimeout ( ( ) => {
129+ if ( searchValue . length > 2 || searchValue === "" )
130+ setSearchValues ( searchValue )
131+ } , 500 ) ;
132+ } )
133+
128134 useEffect ( ( ) => {
129135 fetchDatasourcePagination (
130136 {
@@ -174,7 +180,6 @@ export const DatasourceList = () => {
174180 placeholder = { trans ( "search" ) }
175181 value = { searchValue }
176182 onChange = { ( e ) => setSearchValue ( e . target . value ) }
177- onEnterPress = { ( value ) => setSearchValues ( value ) }
178183 style = { { width : "192px" , height : "32px" , margin : "0 12px 0 0" } } />
179184 < AddBtn buttonType = { "primary" } onClick = { ( ) => showCreateForm ( true ) } >
180185 { trans ( "home.newDatasource" ) }
You can’t perform that action at this time.
0 commit comments