muffin-admin 3.18.0 → 3.18.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "muffin-admin",
3
- "version": "3.18.0",
3
+ "version": "3.18.2",
4
4
  "description": "NPM package for https://github.com/klen/muffin-admin",
5
5
  "files": [
6
6
  "src",
@@ -160,11 +160,11 @@ export function CommonPayload({
160
160
  title={
161
161
  help
162
162
  ? ((
163
- <Stack alignItems="flex-start">
164
- <span>{translate(title, { _: title })}</span>
165
- <HelpLink href={help} style={{ alignSelf: "flex-end" }} />
166
- </Stack>
167
- ) as any)
163
+ <Stack alignItems="flex-start">
164
+ <span>{translate(title, { _: title })}</span>
165
+ <HelpLink href={help} style={{ alignSelf: "flex-end" }} />
166
+ </Stack>
167
+ ) as any)
168
168
  : translate(title, { _: title })
169
169
  }
170
170
  actions={
@@ -196,13 +196,14 @@ function FileButton({
196
196
  filterValues?: any
197
197
  }) {
198
198
  const { apiUrl } = useMuffinAdminOpts()
199
- let url = `${apiUrl}${path}`
199
+ let url = `${apiUrl}${path}?f`
200
200
  if (record) url = url.replace("{id}", record.id as string)
201
201
  const authorization = requestHeaders["Authorization"]
202
- if (authorization) url += `?t=${authorization}`
202
+ if (authorization) url += `&t=${authorization}`
203
203
  if (Object.keys(filterValues).length) url += `&where=${JSON.stringify(filterValues)}`
204
+
204
205
  return (
205
- <Button href={url} label={label} component={Link} target="_blank">
206
+ <Button href={url} label={label} component={Link}>
206
207
  {buildIcon(icon)}
207
208
  </Button>
208
209
  )