Skip to content

Commit 071a3c0

Browse files
authored
Chore/rls nudge (supabase#28347)
* Show use check expression by default * Fix with check on select and fix height jumping
1 parent d05b4bc commit 071a3c0

File tree

1 file changed

+7
-3
lines changed
  • apps/studio/components/interfaces/Auth/Policies/AIPolicyEditorPanel

1 file changed

+7
-3
lines changed

apps/studio/components/interfaces/Auth/Policies/AIPolicyEditorPanel/index.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ export const AIPolicyEditorPanel = memo(function ({
108108
const [using, setUsing] = useState('')
109109
const [check, setCheck] = useState('')
110110
const [fieldError, setFieldError] = useState<string>()
111-
const [showCheckBlock, setShowCheckBlock] = useState(false)
111+
const [showCheckBlock, setShowCheckBlock] = useState(true)
112112

113113
const monacoOneRef = useRef<Monaco | null>(null)
114114
const editorOneRef = useRef<IStandaloneCodeEditor | null>(null)
@@ -549,7 +549,11 @@ export const AIPolicyEditorPanel = memo(function ({
549549
form={form}
550550
onUpdateCommand={(command: string) => {
551551
setFieldError(undefined)
552-
if (!['update', 'all'].includes(command)) setShowCheckBlock(false)
552+
if (!['update', 'all'].includes(command)) {
553+
setShowCheckBlock(false)
554+
} else {
555+
setShowCheckBlock(true)
556+
}
553557
}}
554558
authContext={authContext}
555559
/>
@@ -627,7 +631,7 @@ export const AIPolicyEditorPanel = memo(function ({
627631
{showCheckBlock && (
628632
<>
629633
<div
630-
className={`mt-1 relative ${incomingChange ? 'hidden' : 'block'}`}
634+
className={`mt-1 min-h-[28px] relative ${incomingChange ? 'hidden' : 'block'}`}
631635
style={{
632636
height:
633637
expTwoContentHeight <= 100

0 commit comments

Comments
 (0)