🐛 Fixing office roles not changing
This commit is contained in:
parent
ef2de855ca
commit
a5d74176d5
@ -28,7 +28,7 @@ export default class OfficeRoles extends BaseAdmin {
|
||||
}
|
||||
}
|
||||
|
||||
public async get(q: IGetRolesParams): Promise<OfficeRole[]> {
|
||||
public async get(q?: IGetRolesParams): Promise<OfficeRole[]> {
|
||||
const url = new URL(this.baseURl);
|
||||
if (q) {
|
||||
const query = { q };
|
||||
|
@ -123,6 +123,12 @@ export default class SelectField extends React.Component<IProps, IState> {
|
||||
errors: this.props.errors ?? null,
|
||||
});
|
||||
}
|
||||
|
||||
if (this.props.selectedOption !== prevProps.selectedOption) {
|
||||
this.setState({
|
||||
selectedOption: this.props.selectedOption ?? null,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
static getDerivedStateFromProps(props: IProps, state: IState) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user