The Messenger of Allah ﷺ as saying: There is the right of option regarding everything which is shared, whether a dwelling or a garden. It is not lawful to sell before informing one's partner, but if he sells without informing him, he has the greatest right to it.
قَالَ رَسُولُ اللَّهِ ﷺ الشُّفْعَةُ فِي كُلِّ شِرْكٍ رَبْعَةٍ أَوْ حَائِطٍ لاَ يَصْلُحُ أَنْ يَبِيعَ حَتَّى يُؤْذِنَ شَرِيكَهُ فَإِنْ بَاعَ فَهُوَ أَحَقُّ بِهِ حَتَّى يُؤْذِنَهُ