(prevProps: MappingProps)
| 177 | } |
| 178 | |
| 179 | componentDidUpdate(prevProps: MappingProps) { |
| 180 | const props = this.props; |
| 181 | const {store, source, data} = this.props; |
| 182 | store.syncProps( |
| 183 | props, |
| 184 | prevProps, |
| 185 | source ? ['valueField'] : ['valueField', 'map'] |
| 186 | ); |
| 187 | |
| 188 | if (isPureVariable(source)) { |
| 189 | const prev = resolveVariableAndFilter( |
| 190 | prevProps.source as string, |
| 191 | prevProps.data, |
| 192 | '| raw' |
| 193 | ); |
| 194 | const curr = resolveVariableAndFilter(source as string, data, '| raw'); |
| 195 | |
| 196 | if (prev !== curr) { |
| 197 | store.setMap(curr); |
| 198 | } |
| 199 | } else if ( |
| 200 | isApiOutdated( |
| 201 | prevProps.source, |
| 202 | props.source, |
| 203 | prevProps.data, |
| 204 | props.data |
| 205 | ) |
| 206 | ) { |
| 207 | this.reload(); |
| 208 | } |
| 209 | } |
| 210 | |
| 211 | reload() { |
| 212 | const {source, data, env} = this.props; |
nothing calls this directly
no test coverage detected