Overnight onion

Is it okay to chop an onion and keep it in the fridge overnight?

No problem

Then what would be considered לינת לילה? Only a bigger piece both ends chopped off etc?

A fridge is considered covered.

Thank you!