Disabe search input in encrypted room
Signed-off-by: Ajay Bura <ajbura@gmail.com>
This commit is contained in:
@@ -109,8 +109,8 @@ function RoomSearch({ roomId }) {
|
|||||||
const searchTerm = searchData?._query.search_categories.room_events.search_term ?? '';
|
const searchTerm = searchData?._query.search_categories.room_events.search_term ?? '';
|
||||||
|
|
||||||
const handleSearch = (e) => {
|
const handleSearch = (e) => {
|
||||||
if (isRoomEncrypted) return;
|
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
if (isRoomEncrypted) return;
|
||||||
const searchTermInput = e.target.elements['room-search-input'];
|
const searchTermInput = e.target.elements['room-search-input'];
|
||||||
const term = searchTermInput.value.trim();
|
const term = searchTermInput.value.trim();
|
||||||
|
|
||||||
@@ -144,6 +144,7 @@ function RoomSearch({ roomId }) {
|
|||||||
<Input
|
<Input
|
||||||
placeholder="Search for keywords"
|
placeholder="Search for keywords"
|
||||||
name="room-search-input"
|
name="room-search-input"
|
||||||
|
disabled={isRoomEncrypted}
|
||||||
/>
|
/>
|
||||||
<Button iconSrc={SearchIC} variant="primary" type="submit">Search</Button>
|
<Button iconSrc={SearchIC} variant="primary" type="submit">Search</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user