Hi Hoai,
From your example, it seems like you're not looking for the indeterminate option, but a way to handle your (de)select all.
If that's the case indeed, I would build an onChange for your 'select all' checkbox. If it's set to checked (=true), set all the below to true, if set to unchecked (=false), set all the below to false. The upper checkbox still has only 2 states then though.