Web:Client:Add selectOption, delete selectType.
This commit is contained in:
parent
cee1eb8c6c
commit
b959daddee
@ -930,14 +930,21 @@ class FilesActionStore {
|
||||
fetchRooms(id, newFilter).finally(() => setIsLoading(false));
|
||||
};
|
||||
|
||||
selectType = (type) => {
|
||||
selectOption = ({ option, value }) => {
|
||||
const { roomsFilter, fetchRooms, setIsLoading } = this.filesStore;
|
||||
const { id } = this.selectedFolderStore;
|
||||
|
||||
const newFilter = roomsFilter.clone();
|
||||
const tags = newFilter.tags ? [...newFilter.tags] : [];
|
||||
newFilter.tags = [...tags];
|
||||
newFilter.type = type;
|
||||
|
||||
if (option === "defaultTypeRoom") {
|
||||
newFilter.type = value;
|
||||
}
|
||||
|
||||
if (option === "typeProvider") {
|
||||
newFilter.provider = value;
|
||||
}
|
||||
|
||||
setIsLoading(true);
|
||||
fetchRooms(id, newFilter).finally(() => setIsLoading(false));
|
||||
|
Loading…
Reference in New Issue
Block a user