File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -59,6 +59,12 @@ export default function Config() {
5959 setPreparedOptions ( removeDuplicates ) ;
6060 } , [ tokenizerValues , localConfig ] ) ;
6161
62+ useEffect ( ( ) => {
63+ return ( ) => {
64+ ConfigManager . refreshConfig ( ) ;
65+ }
66+ } , [ ] ) ;
67+
6268 function checkAndSaveValue ( value : any , key : string , subkey : string = null ) {
6369 if ( key == "limit_checks" ) {
6470 if ( Number ( value ) == organization [ snakeCaseToCamelCase ( subkey ) ] ) return ;
@@ -88,8 +94,6 @@ export default function Config() {
8894 updateConfigMut ( { variables : { dictStr : JSON . stringify ( updateDict ) } } ) . then ( ( res ) => {
8995 if ( ! res ?. data ?. updateConfig ) {
9096 window . alert ( 'something went wrong with the update' ) ;
91- } else {
92- ConfigManager . refreshConfig ( ) ;
9397 }
9498 } ) ;
9599 }
@@ -184,6 +188,7 @@ export default function Config() {
184188 dropdownItemsClasses = "max-h-80 overflow-y-auto"
185189 buttonClasses = "whitespace-nowrap"
186190 dropdownWidth = "w-72"
191+ disabled = { index < 2 }
187192 />
188193 { index > 1 && < button className = "px-1 inline-flex items-center" >
189194 < IconTrash onClick = { ( ) => removeSpacyTokenizer ( myConfig ) } className = "h-6 w-6 text-red-700" />
You can’t perform that action at this time.
0 commit comments